| 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 |
|
| 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 |