mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Bump aiohue to 2.3.0 (#50217)
Co-authored-by: Franck Nijhof <git@frenck.dev>
This commit is contained in:
parent
5d5122c2a4
commit
17fc962a87
@ -1,5 +1,4 @@
|
|||||||
"""Hue binary sensor entities."""
|
"""Hue binary sensor entities."""
|
||||||
|
|
||||||
from aiohue.sensors import TYPE_ZLL_PRESENCE
|
from aiohue.sensors import TYPE_ZLL_PRESENCE
|
||||||
|
|
||||||
from homeassistant.components.binary_sensor import (
|
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):
|
async def async_setup_entry(hass, config_entry, async_add_entities):
|
||||||
"""Defer binary sensor setup to the shared sensor module."""
|
"""Defer binary sensor setup to the shared sensor module."""
|
||||||
await hass.data[HUE_DOMAIN][
|
bridge = hass.data[HUE_DOMAIN][config_entry.entry_id]
|
||||||
config_entry.entry_id
|
|
||||||
].sensor_manager.async_register_component("binary_sensor", async_add_entities)
|
if not bridge.sensor_manager:
|
||||||
|
return
|
||||||
|
|
||||||
|
await bridge.sensor_manager.async_register_component(
|
||||||
|
"binary_sensor", async_add_entities
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class HuePresence(GenericZLLSensor, BinarySensorEntity):
|
class HuePresence(GenericZLLSensor, BinarySensorEntity):
|
||||||
|
@ -102,7 +102,8 @@ class HueBridge:
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
self.api = bridge
|
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)
|
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):
|
async def hue_activate_scene(self, data, skip_reload=False, hide_warnings=False):
|
||||||
"""Service to call directly into bridge to set scenes."""
|
"""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]
|
group_name = data[ATTR_GROUP_NAME]
|
||||||
scene_name = data[ATTR_SCENE_NAME]
|
scene_name = data[ATTR_SCENE_NAME]
|
||||||
transition = data.get(ATTR_TRANSITION)
|
transition = data.get(ATTR_TRANSITION)
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
"name": "Philips Hue",
|
"name": "Philips Hue",
|
||||||
"config_flow": true,
|
"config_flow": true,
|
||||||
"documentation": "https://www.home-assistant.io/integrations/hue",
|
"documentation": "https://www.home-assistant.io/integrations/hue",
|
||||||
"requirements": ["aiohue==2.1.0"],
|
"requirements": ["aiohue==2.3.0"],
|
||||||
"ssdp": [
|
"ssdp": [
|
||||||
{
|
{
|
||||||
"manufacturer": "Royal Philips Electronics",
|
"manufacturer": "Royal Philips Electronics",
|
||||||
|
@ -26,9 +26,12 @@ TEMPERATURE_NAME_FORMAT = "{} temperature"
|
|||||||
|
|
||||||
async def async_setup_entry(hass, config_entry, async_add_entities):
|
async def async_setup_entry(hass, config_entry, async_add_entities):
|
||||||
"""Defer sensor setup to the shared sensor module."""
|
"""Defer sensor setup to the shared sensor module."""
|
||||||
await hass.data[HUE_DOMAIN][
|
bridge = hass.data[HUE_DOMAIN][config_entry.entry_id]
|
||||||
config_entry.entry_id
|
|
||||||
].sensor_manager.async_register_component("sensor", async_add_entities)
|
if not bridge.sensor_manager:
|
||||||
|
return
|
||||||
|
|
||||||
|
await bridge.sensor_manager.async_register_component("sensor", async_add_entities)
|
||||||
|
|
||||||
|
|
||||||
class GenericHueGaugeSensorEntity(GenericZLLSensor, SensorEntity):
|
class GenericHueGaugeSensorEntity(GenericZLLSensor, SensorEntity):
|
||||||
|
@ -182,7 +182,7 @@ aiohomekit==0.2.61
|
|||||||
aiohttp_cors==0.7.0
|
aiohttp_cors==0.7.0
|
||||||
|
|
||||||
# homeassistant.components.hue
|
# homeassistant.components.hue
|
||||||
aiohue==2.1.0
|
aiohue==2.3.0
|
||||||
|
|
||||||
# homeassistant.components.imap
|
# homeassistant.components.imap
|
||||||
aioimaplib==0.7.15
|
aioimaplib==0.7.15
|
||||||
|
@ -119,7 +119,7 @@ aiohomekit==0.2.61
|
|||||||
aiohttp_cors==0.7.0
|
aiohttp_cors==0.7.0
|
||||||
|
|
||||||
# homeassistant.components.hue
|
# homeassistant.components.hue
|
||||||
aiohue==2.1.0
|
aiohue==2.3.0
|
||||||
|
|
||||||
# homeassistant.components.apache_kafka
|
# homeassistant.components.apache_kafka
|
||||||
aiokafka==0.6.0
|
aiokafka==0.6.0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user