Bump aiohue to 2.3.0 ()

Co-authored-by: Franck Nijhof <git@frenck.dev>
pull/50238/head
Paulus Schoutsen 2021-05-07 05:24:47 -07:00 committed by GitHub
parent 5d5122c2a4
commit 17fc962a87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 23 additions and 11 deletions

View File

@ -1,5 +1,4 @@
"""Hue binary sensor entities."""
from aiohue.sensors import TYPE_ZLL_PRESENCE
from homeassistant.components.binary_sensor import (
@ -15,9 +14,14 @@ PRESENCE_NAME_FORMAT = "{} motion"
async def async_setup_entry(hass, config_entry, async_add_entities):
"""Defer binary sensor setup to the shared sensor module."""
await hass.data[HUE_DOMAIN][
config_entry.entry_id
].sensor_manager.async_register_component("binary_sensor", async_add_entities)
bridge = hass.data[HUE_DOMAIN][config_entry.entry_id]
if not bridge.sensor_manager:
return
await bridge.sensor_manager.async_register_component(
"binary_sensor", async_add_entities
)
class HuePresence(GenericZLLSensor, BinarySensorEntity):

View File

@ -102,7 +102,8 @@ class HueBridge:
return False
self.api = bridge
self.sensor_manager = SensorManager(self)
if bridge.sensors is not None:
self.sensor_manager = SensorManager(self)
hass.config_entries.async_setup_platforms(self.config_entry, PLATFORMS)
@ -178,6 +179,10 @@ class HueBridge:
async def hue_activate_scene(self, data, skip_reload=False, hide_warnings=False):
"""Service to call directly into bridge to set scenes."""
if self.api.scenes is None:
_LOGGER.warning("Hub %s does not support scenes", self.api.host)
return
group_name = data[ATTR_GROUP_NAME]
scene_name = data[ATTR_SCENE_NAME]
transition = data.get(ATTR_TRANSITION)

View File

@ -3,7 +3,7 @@
"name": "Philips Hue",
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/hue",
"requirements": ["aiohue==2.1.0"],
"requirements": ["aiohue==2.3.0"],
"ssdp": [
{
"manufacturer": "Royal Philips Electronics",

View File

@ -26,9 +26,12 @@ TEMPERATURE_NAME_FORMAT = "{} temperature"
async def async_setup_entry(hass, config_entry, async_add_entities):
"""Defer sensor setup to the shared sensor module."""
await hass.data[HUE_DOMAIN][
config_entry.entry_id
].sensor_manager.async_register_component("sensor", async_add_entities)
bridge = hass.data[HUE_DOMAIN][config_entry.entry_id]
if not bridge.sensor_manager:
return
await bridge.sensor_manager.async_register_component("sensor", async_add_entities)
class GenericHueGaugeSensorEntity(GenericZLLSensor, SensorEntity):

View File

@ -182,7 +182,7 @@ aiohomekit==0.2.61
aiohttp_cors==0.7.0
# homeassistant.components.hue
aiohue==2.1.0
aiohue==2.3.0
# homeassistant.components.imap
aioimaplib==0.7.15

View File

@ -119,7 +119,7 @@ aiohomekit==0.2.61
aiohttp_cors==0.7.0
# homeassistant.components.hue
aiohue==2.1.0
aiohue==2.3.0
# homeassistant.components.apache_kafka
aiokafka==0.6.0