1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 04:50:05 +00:00
Commit Graph

385 Commits

Author SHA1 Message Date
Jan-Philipp Benecke
eda475fe25 Update h* tests to use entity & device registry fixtures (#103866)
* Update h* tests to use entity & device registry fixtures

* Add missed lines
2023-11-12 13:52:32 -05:00
J. Nick Koston
327bdce561 Handle ATTR_HS_COLOR being None in HomeKit (#102290) 2023-10-18 22:42:39 -10:00
J. Nick Koston
10fd26df4b Preserve HomeKit Accessory ID when entity unique id changes (#102123) 2023-10-16 21:42:02 -10:00
J. Nick Koston
0e499e07d2 Small cleanups to HomeKit thermostats (#101962) 2023-10-13 14:24:23 -10:00
J. Nick Koston
f8f39a29de Update HomeKit humidifiers to handle current humidity (#101964) 2023-10-13 14:23:50 -10:00
J. Nick Koston
265f6653c3 Refactor homekit to use a dataclass for entry data (#101738) 2023-10-10 21:14:37 +02:00
J. Nick Koston
7b4b8e7516 Refactor HomeKit to allow supported features/device class to change (#101719) 2023-10-10 06:20:25 -10:00
J. Nick Koston
f166e1cc1a Map switch device class outlet to Outlets in homekit (#101760) 2023-10-10 05:55:42 -10:00
J. Nick Koston
7d07694496 Fix HomeKit handling of unavailable state (#101021) 2023-09-27 23:34:25 +02:00
J. Nick Koston
4c255677c3 Add support for receivers to HomeKit (#100717) 2023-09-25 09:36:01 -05:00
J. Nick Koston
c1b9400833 Provide a better model for HomeKit service entries (#100848) 2023-09-25 09:34:53 -05:00
Yuxiang Zhu
739eb28b90 Make homekit RTP/RTCP source ports more deterministic (#99989) 2023-09-10 09:07:35 -05:00
Jan Bouwhuis
b36681b318 Update homekit entity feature constants (#98337) 2023-08-13 15:33:36 +02:00
Erik Montnemery
07b19b3dd9 Adjust homekit tests which create devices (#98193) 2023-08-10 18:23:17 +02:00
Erik Montnemery
7539cf25be Don't require passing identifiers to DeviceRegistry.async_get_device (#96479)
* Require keyword arguments to DeviceRegistry.async_get_device

* Update tests

* Update tests

* Don't enforce keyword arguments
2023-07-13 13:39:25 -04:00
J. Nick Koston
e3e1bef376 Fix manual specification of multiple advertise_ip with HomeKit (#95548)
fixes #95508
2023-06-29 11:35:32 -04:00
Franck Nijhof
3e85a29b86 Move overlapping pylint rules to ruff, disable mypy overlap (#94359) 2023-06-27 17:42:46 +02:00
J. Nick Koston
ef2e55ecec Add dual IP stack support to HomeKit (#94126)
* Add dual IP stack support to HomeKit

* fix tests

* Update homeassistant/components/network/__init__.py

* remove scopes

* Bump HAP-python to 4.7.0

fixes pairing with newer iOS

changelog: https://github.com/ikalchev/HAP-python/compare/v4.6.0...4.7.0

* fixes

* update tests

* Relocate get_announced_addresses from zeroconf to network

needed for #94126

* rename

* rename

* Update homeassistant/components/network/__init__.py

* Update homeassistant/components/network/__init__.py

* rename

* fix import

* coverage
2023-06-24 23:18:38 -04:00
J. Nick Koston
b857dc8d94 Bump HAP-python to 4.7.0 (#94812) 2023-06-20 23:06:26 +02:00
J. Nick Koston
a0c023d5cb Reduce overhead to lookup items in the entity and device registry (#94568) 2023-06-14 20:47:18 +02:00
Erik Montnemery
0126cfa9d9 Allow exposing any entity to the default conversation agent (#92398)
* Allow exposing any entity to the default conversation agent

* Tweak

* Fix race, update tests

* Update tests
2023-05-03 09:45:54 -04:00
Erik Montnemery
e3c16e634b Allow exposing entities not in the entity registry to assistants (#92363) 2023-05-02 22:08:09 +02:00
J. Nick Koston
b875706bdd Default homekit to listening on all interfaces to match Home Assistant behavior (#91520) 2023-04-17 09:41:57 +02:00
Assaf Inbal
7446ff478f Add h264_v4l2m2m codec and profiles to HomeKit cameras (#91246) 2023-04-12 10:46:21 -10:00
J. Nick Koston
d442f2aedb Add names to homekit tasks to better track startup problems (#90802)
* Add names to homekit tasks to better track startup problems

* fix test
2023-04-08 23:13:47 -04:00
J. Nick Koston
b4fec762bc Switch to fnv-hash-fast from fnvhash (#90761)
* Switch to fnv-hash-fast from fnvhash

Replaces the pure python implemention with a fast cpp one
when available (with fallback to pure python)

changelog: https://github.com/bdraco/fnv-hash-fast/releases/tag/v0.3.1
source: https://github.com/bdraco/fnv-hash-fast/tree/main/src/fnv_hash_fast

* Apply suggestions from code review

* lint
2023-04-05 20:52:23 -04:00
Stackie Jia
5c2af99520 Improve the HomeKit (de)humidifier min/max humidity handling (#90854) 2023-04-05 06:35:47 -10:00
Doney den Ouden
755c44d152 Add HomeKit Door accessory type (#80741)
Co-authored-by: Jason Redd <jredd46@gmail.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-03-06 18:07:43 -10:00
epenet
ee78864b05 Adjust entity registry access in homekit tests (#88959) 2023-03-01 16:54:00 +01:00
J. Nick Koston
3ebb2fc3a9 Fix handling of HomeKit sources with unsafe characters (#88280)
fixes #87049
2023-02-22 14:33:27 -05:00
emanuelst
0b81c836ef Update HomeKit VOC mappings (#87663)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-02-20 11:56:41 -06:00
epenet
a16e298599 Adjust json imports in tests (#88248) 2023-02-17 19:13:48 +01:00
Franck Nijhof
ed79265843 Enable Ruff PT006 (#88165)
* Enable Ruff PT006

* Adjust existing cases

* Fix tests

* Remove unneeded parentheses
2023-02-15 14:09:50 +01:00
epenet
1e352b60df Add type hints to integration tests (part 11) (#87996) 2023-02-13 14:22:49 +01:00
epenet
03710e58b5 Add type hints to integration tests (part 9) (#87983) 2023-02-13 12:06:51 +01:00
Erik Montnemery
cc564026fa Move EntityCategory to homeassistant.const (#87792)
* Move EntityCategory to homeassistant.const

* Fix more imports
2023-02-09 20:15:37 +01:00
Franck Nijhof
f5b651750c Enable Ruff ICN001 (#87775) 2023-02-09 13:41:50 +01:00
epenet
37a2040d7b Add type hints to integration tests (h-i) (#87703) 2023-02-08 18:12:56 +01:00
epenet
4142f0d15d Add return type to tests without arguments (#87613)
* Add return type to tests without arguments

* Black

* Cancel fixture amends
2023-02-07 14:20:06 +01:00
epenet
aa00114c2f Add return type to async tests without arguments (#87612) 2023-02-07 10:26:56 +01:00
J. Nick Koston
faf79d0b50 Ensure humidity is still exported to HomeKit when it is read-only (#87051)
* Ensure humidity is still exported to HomeKit when is cannot be set

We would only send humidity to HomeKit if the device supported
changing the humidity

* remove unrelated changes
2023-01-31 21:03:43 -05:00
Franck Nijhof
fca3382d37 Migrates tests to use MediaPlayerEntityFeature enum (#86779) 2023-01-27 10:56:40 +01:00
Franck Nijhof
62dcbe5258 Enable Ruff PT001 (#86730) 2023-01-26 18:05:05 +01:00
Michael
e35ab75c0b Replace the usage of unit constants by enumerations in Tests [h-l] (#85934) 2023-01-15 14:52:55 +01:00
epenet
4c8e3aa7c4 Remove lumen from Illuminance units (#84386) 2022-12-27 14:25:47 +01:00
Yuval Aboulafia
3149c52be1 Fix F602 key repeated (#84531) 2022-12-27 11:07:10 +01:00
J. Nick Koston
692a732555 Fix HomeKit media players when entity has duplicate sources (#83890)
fixes #83852 fixes #83698
2022-12-12 21:29:06 -05:00
Joakim Plate
c576a68d33 Upgrade pytest-aiohttp (#82475)
* Upgrade pytest-aiohttp

* Make sure executors, tasks and timers are closed

Some test will trigger warnings on garbage collect, these warnings
spills over into next test.

Some test trigger tasks that raise errors on shutdown, these spill
over into next test.

This is to mimic older pytest-aiohttp and it's behaviour on test
cleanup.

Discussions on similar changes for pytest-aiohttp are here:
https://github.com/pytest-dev/pytest-asyncio/pull/309

* Replace loop with event_loop

* Make sure time is frozen for tests

* Make sure the ConditionType is not async

  /home-assistant/homeassistant/helpers/template.py:2082: RuntimeWarning: coroutine 'AsyncMockMixin._execute_mock_call' was never awaited
    def wrapper(*args, **kwargs):
  Enable tracemalloc to get traceback where the object was allocated.
  See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.

* Increase litejet press tests with a factor 10

The times are simulated anyway, and we can't stop the normal
event from occuring.

* Use async handlers for aiohttp

tests/components/motioneye/test_camera.py::test_get_still_image_from_camera
tests/components/motioneye/test_camera.py::test_get_still_image_from_camera
tests/components/motioneye/test_camera.py::test_get_stream_from_camera
tests/components/motioneye/test_camera.py::test_get_stream_from_camera
tests/components/motioneye/test_camera.py::test_camera_option_stream_url_template
tests/components/motioneye/test_camera.py::test_camera_option_stream_url_template
  /Users/joakim/src/hass/home-assistant/venv/lib/python3.9/site-packages/aiohttp/web_urldispatcher.py:189: DeprecationWarning: Bare functions are deprecated, use async ones
    warnings.warn(

* Switch to freezegun in modbus tests

The tests allowed clock to tick in between steps

* Make sure skybell object are fully mocked

Old tests would trigger attempts to post to could services:

```
DEBUG:aioskybell:HTTP post https://cloud.myskybell.com/api/v3/login/ Request with headers: {'content-type': 'application/json', 'accept': '*/*', 'x-skybell-app-id': 'd2b542c7-a7e4-4e1e-b77d-2b76911c7c46', 'x-skybell-client-id': '1f36a3c0-6dee-4997-a6db-4e1c67338e57'}
```

* Fix sorting that broke after rebase
2022-11-29 22:36:36 +01:00
J. Nick Koston
03e6132d98 Fix static version in homekit tests (#82201) 2022-11-16 09:37:00 -06:00
J. Nick Koston
ade4b62aec Fix instability with HomeKit trigger accessories (#80703)
fixes https://github.com/home-assistant/core/issues/78774
fixes https://github.com/home-assistant/core/issues/81685
2022-11-15 18:41:55 +01:00