1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00

Do not fire homekit_controller events from IP polling (#97869)

* Fix homekit_controller triggers when value is None

* fixes

* cover
This commit is contained in:
J. Nick Koston
2023-08-05 12:31:50 -10:00
committed by GitHub
parent 966784877f
commit a09090bf99
2 changed files with 24 additions and 9 deletions

View File

@@ -425,6 +425,14 @@ async def test_handle_events_late_setup(hass: HomeAssistant, utcnow, calls) -> N
assert len(calls) == 1
assert calls[0].data["some"] == "device - button1 - single_press - 0"
# Make sure automation doesn't trigger for a polled None
helper.pairing.testing.update_named_service(
"Button 1", {CharacteristicsTypes.INPUT_EVENT: None}
)
await hass.async_block_till_done()
assert len(calls) == 1
# Make sure automation doesn't trigger for long press
helper.pairing.testing.update_named_service(
"Button 1", {CharacteristicsTypes.INPUT_EVENT: 1}