1
0
mirror of https://github.com/natekspencer/hacs-oasis_mini.git synced 2025-11-16 09:03:50 -05:00

Handle IP update from DHCP and add drawing progress sensor

This commit is contained in:
Nathan Spencer
2024-07-25 10:52:47 -06:00
parent 71180f68f9
commit 96edafd006
14 changed files with 112 additions and 65 deletions

View File

@@ -66,10 +66,14 @@ class OasisMiniUpdateEntity(OasisMiniEntity, UpdateEntity):
self, version: str | None, backup: bool, **kwargs: Any
) -> None:
"""Install an update."""
version = await self.device.async_get_software_version()
if version == self.latest_version:
return
await self.device.async_upgrade()
async def async_update(self) -> None:
"""Update the entity."""
await self.device.async_get_software_version()
software = await self.device.async_cloud_get_latest_software_details()
self._attr_latest_version = software["version"]
self._attr_release_summary = software["description"]