Bump HAP-python to 4.30 (#57284)

This commit is contained in:
J. Nick Koston 2021-10-07 17:06:27 -10:00 committed by GitHub
parent 49e6f84b1c
commit ddab7f3024
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 17 additions and 15 deletions

View File

@ -3,7 +3,7 @@
"name": "HomeKit", "name": "HomeKit",
"documentation": "https://www.home-assistant.io/integrations/homekit", "documentation": "https://www.home-assistant.io/integrations/homekit",
"requirements": [ "requirements": [
"HAP-python==4.2.1", "HAP-python==4.3.0",
"fnvhash==0.1.0", "fnvhash==0.1.0",
"PyQRCode==1.2.1", "PyQRCode==1.2.1",
"base36==0.1.1" "base36==0.1.1"

View File

@ -14,7 +14,7 @@ Adafruit-SHT31==1.0.2
# Adafruit_BBIO==1.1.1 # Adafruit_BBIO==1.1.1
# homeassistant.components.homekit # homeassistant.components.homekit
HAP-python==4.2.1 HAP-python==4.3.0
# homeassistant.components.mastodon # homeassistant.components.mastodon
Mastodon.py==1.5.1 Mastodon.py==1.5.1

View File

@ -7,7 +7,7 @@
AEMET-OpenData==0.2.1 AEMET-OpenData==0.2.1
# homeassistant.components.homekit # homeassistant.components.homekit
HAP-python==4.2.1 HAP-python==4.3.0
# homeassistant.components.flick_electric # homeassistant.components.flick_electric
PyFlick==0.0.2 PyFlick==0.0.2

View File

@ -297,7 +297,7 @@ async def test_fan_speed(hass, hk_driver, events):
) )
await hass.async_add_executor_job(acc.char_speed.client_update_value, 42) await hass.async_add_executor_job(acc.char_speed.client_update_value, 42)
await hass.async_block_till_done() await hass.async_block_till_done()
assert acc.char_speed.value == 42 assert acc.char_speed.value == 50
assert acc.char_active.value == 1 assert acc.char_active.value == 1
assert call_set_percentage[0] assert call_set_percentage[0]
@ -309,7 +309,7 @@ async def test_fan_speed(hass, hk_driver, events):
# Verify speed is preserved from off to on # Verify speed is preserved from off to on
hass.states.async_set(entity_id, STATE_OFF, {ATTR_PERCENTAGE: 42}) hass.states.async_set(entity_id, STATE_OFF, {ATTR_PERCENTAGE: 42})
await hass.async_block_till_done() await hass.async_block_till_done()
assert acc.char_speed.value == 42 assert acc.char_speed.value == 50
assert acc.char_active.value == 0 assert acc.char_active.value == 0
hk_driver.set_characteristics( hk_driver.set_characteristics(
@ -325,7 +325,7 @@ async def test_fan_speed(hass, hk_driver, events):
"mock_addr", "mock_addr",
) )
await hass.async_block_till_done() await hass.async_block_till_done()
assert acc.char_speed.value == 42 assert acc.char_speed.value == 50
assert acc.char_active.value == 1 assert acc.char_active.value == 1

View File

@ -1,5 +1,7 @@
"""Test different accessory types: Media Players.""" """Test different accessory types: Media Players."""
import pytest
from homeassistant.components.homekit.const import ( from homeassistant.components.homekit.const import (
ATTR_KEY_NAME, ATTR_KEY_NAME,
ATTR_VALUE, ATTR_VALUE,
@ -353,8 +355,9 @@ async def test_media_player_television(hass, hk_driver, events, caplog):
hass.bus.async_listen(EVENT_HOMEKIT_TV_REMOTE_KEY_PRESSED, listener) hass.bus.async_listen(EVENT_HOMEKIT_TV_REMOTE_KEY_PRESSED, listener)
await hass.async_add_executor_job(acc.char_remote_key.client_update_value, 20) with pytest.raises(ValueError):
await hass.async_block_till_done() await hass.async_add_executor_job(acc.char_remote_key.client_update_value, 20)
await hass.async_block_till_done()
await hass.async_add_executor_job(acc.char_remote_key.client_update_value, 7) await hass.async_add_executor_job(acc.char_remote_key.client_update_value, 7)
await hass.async_block_till_done() await hass.async_block_till_done()

View File

@ -1,5 +1,7 @@
"""Test different accessory types: Remotes.""" """Test different accessory types: Remotes."""
import pytest
from homeassistant.components.homekit.const import ( from homeassistant.components.homekit.const import (
ATTR_KEY_NAME, ATTR_KEY_NAME,
ATTR_VALUE, ATTR_VALUE,
@ -140,8 +142,9 @@ async def test_activity_remote(hass, hk_driver, events, caplog):
hass.bus.async_listen(EVENT_HOMEKIT_TV_REMOTE_KEY_PRESSED, listener) hass.bus.async_listen(EVENT_HOMEKIT_TV_REMOTE_KEY_PRESSED, listener)
acc.char_remote_key.client_update_value(20) with pytest.raises(ValueError):
await hass.async_block_till_done() acc.char_remote_key.client_update_value(20)
await hass.async_block_till_done()
acc.char_remote_key.client_update_value(7) acc.char_remote_key.client_update_value(7)
await hass.async_block_till_done() await hass.async_block_till_done()

View File

@ -1746,11 +1746,7 @@ async def test_water_heater(hass, hk_driver, events):
assert len(events) == 1 assert len(events) == 1
assert events[-1].data[ATTR_VALUE] == f"52.0{TEMP_CELSIUS}" assert events[-1].data[ATTR_VALUE] == f"52.0{TEMP_CELSIUS}"
await hass.async_add_executor_job(acc.char_target_heat_cool.client_update_value, 0) await hass.async_add_executor_job(acc.char_target_heat_cool.client_update_value, 1)
await hass.async_block_till_done()
assert acc.char_target_heat_cool.value == 1
await hass.async_add_executor_job(acc.char_target_heat_cool.client_update_value, 2)
await hass.async_block_till_done() await hass.async_block_till_done()
assert acc.char_target_heat_cool.value == 1 assert acc.char_target_heat_cool.value == 1