mirror of
https://github.com/Andre0512/hon.git
synced 2026-05-07 09:54:41 +02:00
Instant send settings
This commit is contained in:
@@ -385,7 +385,9 @@ class HonSwitchEntity(HonEntity, SwitchEntity):
|
||||
setting.max if isinstance(setting, HonParameterRange) else "1"
|
||||
)
|
||||
self.async_write_ha_state()
|
||||
if self._device.appliance_type in ["AC"]:
|
||||
if "settings." in self.entity_description:
|
||||
self._device.commands["settings"].send()
|
||||
elif self._device.appliance_type in ["AC"]:
|
||||
self._device.commands["startProgram"].send()
|
||||
await self.coordinator.async_refresh()
|
||||
else:
|
||||
@@ -398,7 +400,9 @@ class HonSwitchEntity(HonEntity, SwitchEntity):
|
||||
setting.min if isinstance(setting, HonParameterRange) else "0"
|
||||
)
|
||||
self.async_write_ha_state()
|
||||
if self._device.appliance_type in ["AC"]:
|
||||
if "settings." in self.entity_description:
|
||||
self._device.commands["settings"].send()
|
||||
elif self._device.appliance_type in ["AC"]:
|
||||
self._device.commands["startProgram"].send()
|
||||
await self.coordinator.async_refresh()
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user