Debian Codegraph @

blebox_uniapi/update.py

raw symbols SCIP
1 from typing import Optional
2
3 from .feature import Feature
4
5
6 class Update(Feature):
7 @property
8 def installed_version(self) -> Optional[str]:
9 return self._product.firmware_version
10
11 @property
12 def latest_version(self) -> Optional[str]:
13 return self._product.available_firmware_version
14
15 async def async_update(self) -> None:
16 # OTA state is stored as Box attributes, not in last_data. async_update_data() won't trigger the OTA check.
17 await self._product.async_ota_check()
18
19 async def async_install(self) -> None:
20 await self._product.async_ota_update()
21
22 def after_update(self) -> None:
23 pass