Add switch support to the Flo integration (#38268)
* Add switch domain to Flo integration * lint * updates post rebase * fix after rebase * remove device state attrs * oops * stale name and docstring
This commit is contained in:
1 parent
52a9921ed3
commit
ca5e752514
7 files changed
+357
-1
No files matched your search
@@ -162,6 +162,16 @@ class FloDeviceDataUpdateCoordinator(DataUpdateCoordinator):
|
||||
or self.pending_warning_alerts_count
|
||||
)
|
||||
|
||||
@property
|
||||
def last_known_valve_state(self) -> str:
|
||||
"""Return the last known valve state for the device."""
|
||||
return self._device_information["valve"]["lastKnown"]
|
||||
|
||||
@property
|
||||
def target_valve_state(self) -> str:
|
||||
"""Return the target valve state for the device."""
|
||||
return self._device_information["valve"]["target"]
|
||||
|
||||
async def _update_device(self, *_) -> None:
|
||||
"""Update the device information from the API."""
|
||||
self._device_information = await self.api_client.device.get_info(
|
||||
|
||||
Reference in new issue
Block a user