mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
update pyHomee to v1.2.9 (#147094)
This commit is contained in:
parent
956f726ef3
commit
875d81cab2
@ -67,7 +67,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: HomeeConfigEntry) -> boo
|
||||
entry.runtime_data = homee
|
||||
entry.async_on_unload(homee.disconnect)
|
||||
|
||||
def _connection_update_callback(connected: bool) -> None:
|
||||
async def _connection_update_callback(connected: bool) -> None:
|
||||
"""Call when the device is notified of changes."""
|
||||
if connected:
|
||||
_LOGGER.warning("Reconnected to Homee at %s", entry.data[CONF_HOST])
|
||||
|
@ -28,6 +28,7 @@ class HomeeEntity(Entity):
|
||||
self._entry = entry
|
||||
node = entry.runtime_data.get_node_by_id(attribute.node_id)
|
||||
# Homee hub itself has node-id -1
|
||||
assert node is not None
|
||||
if node.id == -1:
|
||||
self._attr_device_info = DeviceInfo(
|
||||
identifiers={(DOMAIN, entry.runtime_data.settings.uid)},
|
||||
@ -79,7 +80,7 @@ class HomeeEntity(Entity):
|
||||
def _on_node_updated(self, attribute: HomeeAttribute) -> None:
|
||||
self.schedule_update_ha_state()
|
||||
|
||||
def _on_connection_changed(self, connected: bool) -> None:
|
||||
async def _on_connection_changed(self, connected: bool) -> None:
|
||||
self._host_connected = connected
|
||||
self.schedule_update_ha_state()
|
||||
|
||||
@ -166,6 +167,6 @@ class HomeeNodeEntity(Entity):
|
||||
def _on_node_updated(self, node: HomeeNode) -> None:
|
||||
self.schedule_update_ha_state()
|
||||
|
||||
def _on_connection_changed(self, connected: bool) -> None:
|
||||
async def _on_connection_changed(self, connected: bool) -> None:
|
||||
self._host_connected = connected
|
||||
self.schedule_update_ha_state()
|
||||
|
@ -58,9 +58,13 @@ class HomeeLock(HomeeEntity, LockEntity):
|
||||
AttributeChangedBy, self._attribute.changed_by
|
||||
)
|
||||
if self._attribute.changed_by == AttributeChangedBy.USER:
|
||||
changed_id = self._entry.runtime_data.get_user_by_id(
|
||||
user = self._entry.runtime_data.get_user_by_id(
|
||||
self._attribute.changed_by_id
|
||||
).username
|
||||
)
|
||||
if user is not None:
|
||||
changed_id = user.username
|
||||
else:
|
||||
changed_id = "Unknown"
|
||||
|
||||
return f"{changed_by_name}-{changed_id}"
|
||||
|
||||
|
@ -8,5 +8,5 @@
|
||||
"iot_class": "local_push",
|
||||
"loggers": ["homee"],
|
||||
"quality_scale": "bronze",
|
||||
"requirements": ["pyHomee==1.2.8"]
|
||||
"requirements": ["pyHomee==1.2.9"]
|
||||
}
|
||||
|
@ -28,6 +28,7 @@ def get_device_class(
|
||||
) -> SwitchDeviceClass:
|
||||
"""Check device class of Switch according to node profile."""
|
||||
node = config_entry.runtime_data.get_node_by_id(attribute.node_id)
|
||||
assert node is not None
|
||||
if node.profile in [
|
||||
NodeProfile.ON_OFF_PLUG,
|
||||
NodeProfile.METERING_PLUG,
|
||||
|
2
requirements_all.txt
generated
2
requirements_all.txt
generated
@ -1798,7 +1798,7 @@ pyEmby==1.10
|
||||
pyHik==0.3.2
|
||||
|
||||
# homeassistant.components.homee
|
||||
pyHomee==1.2.8
|
||||
pyHomee==1.2.9
|
||||
|
||||
# homeassistant.components.rfxtrx
|
||||
pyRFXtrx==0.31.1
|
||||
|
2
requirements_test_all.txt
generated
2
requirements_test_all.txt
generated
@ -1509,7 +1509,7 @@ pyDuotecno==2024.10.1
|
||||
pyElectra==1.2.4
|
||||
|
||||
# homeassistant.components.homee
|
||||
pyHomee==1.2.8
|
||||
pyHomee==1.2.9
|
||||
|
||||
# homeassistant.components.rfxtrx
|
||||
pyRFXtrx==0.31.1
|
||||
|
Loading…
x
Reference in New Issue
Block a user