mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Bump aiohue to version 4.7.2 (#122651)
This commit is contained in:
parent
8a84addc54
commit
6d4711ce43
@ -11,6 +11,6 @@
|
|||||||
"iot_class": "local_push",
|
"iot_class": "local_push",
|
||||||
"loggers": ["aiohue"],
|
"loggers": ["aiohue"],
|
||||||
"quality_scale": "platinum",
|
"quality_scale": "platinum",
|
||||||
"requirements": ["aiohue==4.7.1"],
|
"requirements": ["aiohue==4.7.2"],
|
||||||
"zeroconf": ["_hue._tcp.local."]
|
"zeroconf": ["_hue._tcp.local."]
|
||||||
}
|
}
|
||||||
|
@ -55,7 +55,7 @@ async def async_setup_hue_events(bridge: HueBridge):
|
|||||||
CONF_ID: slugify(f"{hue_device.metadata.name} Button"),
|
CONF_ID: slugify(f"{hue_device.metadata.name} Button"),
|
||||||
CONF_DEVICE_ID: device.id, # type: ignore[union-attr]
|
CONF_DEVICE_ID: device.id, # type: ignore[union-attr]
|
||||||
CONF_UNIQUE_ID: hue_resource.id,
|
CONF_UNIQUE_ID: hue_resource.id,
|
||||||
CONF_TYPE: hue_resource.button.last_event.value,
|
CONF_TYPE: hue_resource.button.button_report.event.value,
|
||||||
CONF_SUBTYPE: hue_resource.metadata.control_id,
|
CONF_SUBTYPE: hue_resource.metadata.control_id,
|
||||||
}
|
}
|
||||||
hass.bus.async_fire(ATTR_HUE_EVENT, data)
|
hass.bus.async_fire(ATTR_HUE_EVENT, data)
|
||||||
@ -79,7 +79,7 @@ async def async_setup_hue_events(bridge: HueBridge):
|
|||||||
data = {
|
data = {
|
||||||
CONF_DEVICE_ID: device.id, # type: ignore[union-attr]
|
CONF_DEVICE_ID: device.id, # type: ignore[union-attr]
|
||||||
CONF_UNIQUE_ID: hue_resource.id,
|
CONF_UNIQUE_ID: hue_resource.id,
|
||||||
CONF_TYPE: hue_resource.relative_rotary.last_event.action.value,
|
CONF_TYPE: hue_resource.relative_rotary.rotary_report.action.value,
|
||||||
CONF_SUBTYPE: hue_resource.relative_rotary.last_event.rotation.direction.value,
|
CONF_SUBTYPE: hue_resource.relative_rotary.last_event.rotation.direction.value,
|
||||||
CONF_DURATION: hue_resource.relative_rotary.last_event.rotation.duration,
|
CONF_DURATION: hue_resource.relative_rotary.last_event.rotation.duration,
|
||||||
CONF_STEPS: hue_resource.relative_rotary.last_event.rotation.steps,
|
CONF_STEPS: hue_resource.relative_rotary.last_event.rotation.steps,
|
||||||
|
@ -258,7 +258,7 @@ aioharmony==0.2.10
|
|||||||
aiohomekit==3.2.1
|
aiohomekit==3.2.1
|
||||||
|
|
||||||
# homeassistant.components.hue
|
# homeassistant.components.hue
|
||||||
aiohue==4.7.1
|
aiohue==4.7.2
|
||||||
|
|
||||||
# homeassistant.components.imap
|
# homeassistant.components.imap
|
||||||
aioimaplib==1.1.0
|
aioimaplib==1.1.0
|
||||||
|
@ -243,7 +243,7 @@ aioharmony==0.2.10
|
|||||||
aiohomekit==3.2.1
|
aiohomekit==3.2.1
|
||||||
|
|
||||||
# homeassistant.components.hue
|
# homeassistant.components.hue
|
||||||
aiohue==4.7.1
|
aiohue==4.7.2
|
||||||
|
|
||||||
# homeassistant.components.imap
|
# homeassistant.components.imap
|
||||||
aioimaplib==1.1.0
|
aioimaplib==1.1.0
|
||||||
|
@ -1487,6 +1487,10 @@
|
|||||||
"on": {
|
"on": {
|
||||||
"on": true
|
"on": true
|
||||||
},
|
},
|
||||||
|
"owner": {
|
||||||
|
"rid": "7cee478d-6455-483a-9e32-9f9fdcbcc4f6",
|
||||||
|
"rtype": "zone"
|
||||||
|
},
|
||||||
"type": "grouped_light"
|
"type": "grouped_light"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -1498,6 +1502,10 @@
|
|||||||
"on": {
|
"on": {
|
||||||
"on": true
|
"on": true
|
||||||
},
|
},
|
||||||
|
"owner": {
|
||||||
|
"rid": "7cee478d-6455-483a-9e32-9f9fdcbcc4f6",
|
||||||
|
"rtype": "zone"
|
||||||
|
},
|
||||||
"type": "grouped_light"
|
"type": "grouped_light"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -1509,6 +1517,10 @@
|
|||||||
"on": {
|
"on": {
|
||||||
"on": false
|
"on": false
|
||||||
},
|
},
|
||||||
|
"owner": {
|
||||||
|
"rid": "7cee478d-6455-483a-9e32-9f9fdcbcc4f6",
|
||||||
|
"rtype": "zone"
|
||||||
|
},
|
||||||
"type": "grouped_light"
|
"type": "grouped_light"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -31,7 +31,12 @@ async def test_hue_event(
|
|||||||
|
|
||||||
# Emit button update event
|
# Emit button update event
|
||||||
btn_event = {
|
btn_event = {
|
||||||
"button": {"last_event": "initial_press"},
|
"button": {
|
||||||
|
"button_report": {
|
||||||
|
"event": "initial_press",
|
||||||
|
"updated": "2021-10-01T12:00:00Z",
|
||||||
|
}
|
||||||
|
},
|
||||||
"id": "c658d3d8-a013-4b81-8ac6-78b248537e70",
|
"id": "c658d3d8-a013-4b81-8ac6-78b248537e70",
|
||||||
"metadata": {"control_id": 1},
|
"metadata": {"control_id": 1},
|
||||||
"type": "button",
|
"type": "button",
|
||||||
@ -44,7 +49,7 @@ async def test_hue_event(
|
|||||||
assert len(events) == 1
|
assert len(events) == 1
|
||||||
assert events[0].data["id"] == "wall_switch_with_2_controls_button"
|
assert events[0].data["id"] == "wall_switch_with_2_controls_button"
|
||||||
assert events[0].data["unique_id"] == btn_event["id"]
|
assert events[0].data["unique_id"] == btn_event["id"]
|
||||||
assert events[0].data["type"] == btn_event["button"]["last_event"]
|
assert events[0].data["type"] == btn_event["button"]["button_report"]["event"]
|
||||||
assert events[0].data["subtype"] == btn_event["metadata"]["control_id"]
|
assert events[0].data["subtype"] == btn_event["metadata"]["control_id"]
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user