Compare commits

...

2 Commits

Author SHA1 Message Date
8c1bba2468 Bump pyhon version 2023-04-23 20:18:00 +02:00
616f7babdb Faster refresh when changing configs 2023-04-23 20:04:19 +02:00
4 changed files with 6 additions and 4 deletions

View File

@ -6,6 +6,6 @@
"documentation": "https://github.com/Andre0512/hon/",
"iot_class": "cloud_polling",
"issue_tracker": "https://github.com/Andre0512/hon/issues",
"requirements": ["pyhOn==0.8.5"],
"version": "0.7.0-beta.4"
"requirements": ["pyhOn==0.8.6"],
"version": "0.7.0-beta.5"
}

View File

@ -180,7 +180,7 @@ class HonNumberEntity(HonEntity, NumberEntity):
async def async_set_native_value(self, value: float) -> None:
self._device.settings[self.entity_description.key].value = value
await self.coordinator.async_request_refresh()
await self.coordinator.async_refresh()
@callback
def _handle_coordinator_update(self):

View File

@ -147,7 +147,7 @@ class HonSelectEntity(HonEntity, SelectEntity):
async def async_select_option(self, option: str) -> None:
self._device.settings[self.entity_description.key].value = option
await self.coordinator.async_request_refresh()
await self.coordinator.async_refresh()
@callback
def _handle_coordinator_update(self):

View File

@ -253,6 +253,7 @@ class HonSwitchEntity(HonEntity, SwitchEntity):
setting.max if isinstance(setting, HonParameterRange) else "1"
)
self.async_write_ha_state()
await self.coordinator.async_refresh()
else:
await self._device.commands[self.entity_description.turn_on_key].send()
@ -263,5 +264,6 @@ class HonSwitchEntity(HonEntity, SwitchEntity):
setting.min if isinstance(setting, HonParameterRange) else "0"
)
self.async_write_ha_state()
await self.coordinator.async_refresh()
else:
await self._device.commands[self.entity_description.turn_off_key].send()