mirror of
https://github.com/home-assistant/core.git
synced 2025-07-14 16:57:10 +00:00
Update HAP-python to 2.3.0 (#17778)
* Update HAP-python to 2.3.0 * Fix tests
This commit is contained in:
parent
af03390c4f
commit
bc67115df3
@ -29,7 +29,7 @@ from .const import (
|
|||||||
from .util import (
|
from .util import (
|
||||||
show_setup_message, validate_entity_config, validate_media_player_features)
|
show_setup_message, validate_entity_config, validate_media_player_features)
|
||||||
|
|
||||||
REQUIREMENTS = ['HAP-python==2.2.2']
|
REQUIREMENTS = ['HAP-python==2.3.0']
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
"""Class to hold all switch accessories."""
|
"""Class to hold all switch accessories."""
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from pyhap.const import CATEGORY_OUTLET, CATEGORY_SWITCH
|
from pyhap.const import (
|
||||||
|
CATEGORY_FAUCET, CATEGORY_OUTLET, CATEGORY_SHOWER_HEAD,
|
||||||
|
CATEGORY_SPRINKLER, CATEGORY_SWITCH)
|
||||||
|
|
||||||
from homeassistant.components.switch import DOMAIN
|
from homeassistant.components.switch import DOMAIN
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
@ -17,10 +19,6 @@ from .const import (
|
|||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
CATEGORY_SPRINKLER = 28
|
|
||||||
CATEGORY_FAUCET = 29
|
|
||||||
CATEGORY_SHOWER_HEAD = 30
|
|
||||||
|
|
||||||
VALVE_TYPE = {
|
VALVE_TYPE = {
|
||||||
TYPE_FAUCET: (CATEGORY_FAUCET, 3),
|
TYPE_FAUCET: (CATEGORY_FAUCET, 3),
|
||||||
TYPE_SHOWER: (CATEGORY_SHOWER_HEAD, 2),
|
TYPE_SHOWER: (CATEGORY_SHOWER_HEAD, 2),
|
||||||
|
@ -34,7 +34,7 @@ Adafruit-SHT31==1.0.2
|
|||||||
DoorBirdPy==0.1.3
|
DoorBirdPy==0.1.3
|
||||||
|
|
||||||
# homeassistant.components.homekit
|
# homeassistant.components.homekit
|
||||||
HAP-python==2.2.2
|
HAP-python==2.3.0
|
||||||
|
|
||||||
# homeassistant.components.notify.mastodon
|
# homeassistant.components.notify.mastodon
|
||||||
Mastodon.py==1.3.1
|
Mastodon.py==1.3.1
|
||||||
|
@ -19,7 +19,7 @@ requests_mock==1.5.2
|
|||||||
|
|
||||||
|
|
||||||
# homeassistant.components.homekit
|
# homeassistant.components.homekit
|
||||||
HAP-python==2.2.2
|
HAP-python==2.3.0
|
||||||
|
|
||||||
# homeassistant.components.sensor.rmvtransport
|
# homeassistant.components.sensor.rmvtransport
|
||||||
PyRMVtransport==0.1.3
|
PyRMVtransport==0.1.3
|
||||||
|
@ -82,6 +82,7 @@ async def test_no_code(hass, hk_driver, config, events):
|
|||||||
# Set from HomeKit
|
# Set from HomeKit
|
||||||
call_lock = async_mock_service(hass, DOMAIN, 'lock')
|
call_lock = async_mock_service(hass, DOMAIN, 'lock')
|
||||||
|
|
||||||
|
acc.char_target_state.value = 0
|
||||||
await hass.async_add_job(acc.char_target_state.client_update_value, 1)
|
await hass.async_add_job(acc.char_target_state.client_update_value, 1)
|
||||||
await hass.async_block_till_done()
|
await hass.async_block_till_done()
|
||||||
assert call_lock
|
assert call_lock
|
||||||
|
@ -64,6 +64,7 @@ async def test_media_player_set_state(hass, hk_driver, events):
|
|||||||
call_media_stop = async_mock_service(hass, DOMAIN, 'media_stop')
|
call_media_stop = async_mock_service(hass, DOMAIN, 'media_stop')
|
||||||
call_toggle_mute = async_mock_service(hass, DOMAIN, 'volume_mute')
|
call_toggle_mute = async_mock_service(hass, DOMAIN, 'volume_mute')
|
||||||
|
|
||||||
|
acc.chars[FEATURE_ON_OFF].value = False
|
||||||
await hass.async_add_job(acc.chars[FEATURE_ON_OFF]
|
await hass.async_add_job(acc.chars[FEATURE_ON_OFF]
|
||||||
.client_update_value, True)
|
.client_update_value, True)
|
||||||
await hass.async_block_till_done()
|
await hass.async_block_till_done()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user