mirror of
https://github.com/home-assistant/core.git
synced 2025-07-28 15:47:12 +00:00
Report update_percentage in tessie update entity (#129385)
This commit is contained in:
parent
7254ebe0e3
commit
e34fab0045
@ -71,14 +71,22 @@ class TessieUpdateEntity(TessieEntity, UpdateEntity):
|
|||||||
return self.installed_version
|
return self.installed_version
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def in_progress(self) -> bool | int | None:
|
def in_progress(self) -> bool:
|
||||||
|
"""Update installation progress."""
|
||||||
|
return (
|
||||||
|
self.get("vehicle_state_software_update_status")
|
||||||
|
== TessieUpdateStatus.INSTALLING
|
||||||
|
)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def update_percentage(self) -> int | None:
|
||||||
"""Update installation progress."""
|
"""Update installation progress."""
|
||||||
if (
|
if (
|
||||||
self.get("vehicle_state_software_update_status")
|
self.get("vehicle_state_software_update_status")
|
||||||
== TessieUpdateStatus.INSTALLING
|
== TessieUpdateStatus.INSTALLING
|
||||||
):
|
):
|
||||||
return self.get("vehicle_state_software_update_install_perc")
|
return self.get("vehicle_state_software_update_install_perc")
|
||||||
return False
|
return None
|
||||||
|
|
||||||
async def async_install(
|
async def async_install(
|
||||||
self, version: str | None, backup: bool, **kwargs: Any
|
self, version: str | None, backup: bool, **kwargs: Any
|
||||||
|
Loading…
x
Reference in New Issue
Block a user