mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
Add update_without_throttle to ecobee number (#116504)
add update_without_throttle
This commit is contained in:
parent
8168aff253
commit
db6e3f7cbf
@ -88,10 +88,15 @@ class EcobeeVentilatorMinTime(EcobeeBaseEntity, NumberEntity):
|
||||
super().__init__(data, thermostat_index)
|
||||
self.entity_description = description
|
||||
self._attr_unique_id = f"{self.base_unique_id}_ventilator_{description.key}"
|
||||
self.update_without_throttle = False
|
||||
|
||||
async def async_update(self) -> None:
|
||||
"""Get the latest state from the thermostat."""
|
||||
await self.data.update()
|
||||
if self.update_without_throttle:
|
||||
await self.data.update(no_throttle=True)
|
||||
self.update_without_throttle = False
|
||||
else:
|
||||
await self.data.update()
|
||||
self._attr_native_value = self.thermostat["settings"][
|
||||
self.entity_description.ecobee_setting_key
|
||||
]
|
||||
@ -99,3 +104,4 @@ class EcobeeVentilatorMinTime(EcobeeBaseEntity, NumberEntity):
|
||||
def set_native_value(self, value: float) -> None:
|
||||
"""Set new ventilator Min On Time value."""
|
||||
self.entity_description.set_fn(self.data, self.thermostat_index, int(value))
|
||||
self.update_without_throttle = True
|
||||
|
Loading…
x
Reference in New Issue
Block a user