Bump aiohomekit to 3.0.7 (#102408)
This commit is contained in:
parent
b70262fe8c
commit
f51743f123
4 changed files with 10 additions and 10 deletions
|
@ -14,6 +14,6 @@
|
||||||
"documentation": "https://www.home-assistant.io/integrations/homekit_controller",
|
"documentation": "https://www.home-assistant.io/integrations/homekit_controller",
|
||||||
"iot_class": "local_push",
|
"iot_class": "local_push",
|
||||||
"loggers": ["aiohomekit", "commentjson"],
|
"loggers": ["aiohomekit", "commentjson"],
|
||||||
"requirements": ["aiohomekit==3.0.6"],
|
"requirements": ["aiohomekit==3.0.7"],
|
||||||
"zeroconf": ["_hap._tcp.local.", "_hap._udp.local."]
|
"zeroconf": ["_hap._tcp.local.", "_hap._udp.local."]
|
||||||
}
|
}
|
||||||
|
|
|
@ -255,7 +255,7 @@ aioguardian==2022.07.0
|
||||||
aioharmony==0.2.10
|
aioharmony==0.2.10
|
||||||
|
|
||||||
# homeassistant.components.homekit_controller
|
# homeassistant.components.homekit_controller
|
||||||
aiohomekit==3.0.6
|
aiohomekit==3.0.7
|
||||||
|
|
||||||
# homeassistant.components.emulated_hue
|
# homeassistant.components.emulated_hue
|
||||||
# homeassistant.components.http
|
# homeassistant.components.http
|
||||||
|
|
|
@ -233,7 +233,7 @@ aioguardian==2022.07.0
|
||||||
aioharmony==0.2.10
|
aioharmony==0.2.10
|
||||||
|
|
||||||
# homeassistant.components.homekit_controller
|
# homeassistant.components.homekit_controller
|
||||||
aiohomekit==3.0.6
|
aiohomekit==3.0.7
|
||||||
|
|
||||||
# homeassistant.components.emulated_hue
|
# homeassistant.components.emulated_hue
|
||||||
# homeassistant.components.http
|
# homeassistant.components.http
|
||||||
|
|
|
@ -7,6 +7,9 @@ from aiohomekit.model import CharacteristicsTypes, ServicesTypes
|
||||||
from aiohomekit.testing import FakePairing
|
from aiohomekit.testing import FakePairing
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
|
from homeassistant.components.homekit_controller.connection import (
|
||||||
|
MAX_POLL_FAILURES_TO_DECLARE_UNAVAILABLE,
|
||||||
|
)
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
import homeassistant.util.dt as dt_util
|
import homeassistant.util.dt as dt_util
|
||||||
|
|
||||||
|
@ -26,8 +29,6 @@ async def test_recover_from_failure(hass: HomeAssistant, utcnow, failure_cls) ->
|
||||||
accessories = await setup_accessories_from_file(hass, "koogeek_ls1.json")
|
accessories = await setup_accessories_from_file(hass, "koogeek_ls1.json")
|
||||||
config_entry, pairing = await setup_test_accessories(hass, accessories)
|
config_entry, pairing = await setup_test_accessories(hass, accessories)
|
||||||
|
|
||||||
pairing.testing.events_enabled = False
|
|
||||||
|
|
||||||
helper = Helper(
|
helper = Helper(
|
||||||
hass,
|
hass,
|
||||||
"light.koogeek_ls1_20833f_light_strip",
|
"light.koogeek_ls1_20833f_light_strip",
|
||||||
|
@ -49,11 +50,10 @@ async def test_recover_from_failure(hass: HomeAssistant, utcnow, failure_cls) ->
|
||||||
with mock.patch.object(FakePairing, "get_characteristics") as get_char:
|
with mock.patch.object(FakePairing, "get_characteristics") as get_char:
|
||||||
get_char.side_effect = failure_cls("Disconnected")
|
get_char.side_effect = failure_cls("Disconnected")
|
||||||
|
|
||||||
# Set light state on fake device to on
|
# Test that a poll triggers unavailable
|
||||||
state = await helper.async_update(
|
for _ in range(MAX_POLL_FAILURES_TO_DECLARE_UNAVAILABLE + 2):
|
||||||
ServicesTypes.LIGHTBULB, {CharacteristicsTypes.ON: True}
|
state = await helper.poll_and_get_state()
|
||||||
)
|
assert state.state == "unavailable"
|
||||||
assert state.state == "off"
|
|
||||||
|
|
||||||
chars = get_char.call_args[0][0]
|
chars = get_char.call_args[0][0]
|
||||||
assert set(chars) == {(1, 8), (1, 9), (1, 10), (1, 11)}
|
assert set(chars) == {(1, 8), (1, 9), (1, 10), (1, 11)}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue