Fix run errors in Tessie (#106521)
parent
5b706cedeb
commit
fb893a5315
|
@ -52,7 +52,7 @@ class TessieEntity(CoordinatorEntity[TessieStateUpdateCoordinator]):
|
|||
return self.coordinator.data.get(key or self.key, default)
|
||||
|
||||
async def run(
|
||||
self, func: Callable[..., Awaitable[dict[str, bool]]], **kargs: Any
|
||||
self, func: Callable[..., Awaitable[dict[str, bool | str]]], **kargs: Any
|
||||
) -> None:
|
||||
"""Run a tessie_api function and handle exceptions."""
|
||||
try:
|
||||
|
@ -66,7 +66,7 @@ class TessieEntity(CoordinatorEntity[TessieStateUpdateCoordinator]):
|
|||
raise HomeAssistantError from e
|
||||
if response["result"] is False:
|
||||
raise HomeAssistantError(
|
||||
response.get("reason"), "An unknown issue occurred"
|
||||
response.get("reason", "An unknown issue occurred")
|
||||
)
|
||||
|
||||
def set(self, *args: Any) -> None:
|
||||
|
|
Loading…
Reference in New Issue