Log exception that caused disconnect

This commit is contained in:
tronikos
2023-04-07 07:06:16 +00:00
parent bb045b943d
commit 110fa881ff
4 changed files with 6 additions and 5 deletions

View File

@@ -8,6 +8,6 @@
"iot_class": "local_push",
"loggers": ["androidtvremote2"],
"quality_scale": "platinum",
"requirements": ["androidtvremote2==0.0.5"],
"requirements": ["androidtvremote2==0.0.6"],
"zeroconf": ["_androidtvremote2._tcp.local."]
}

View File

@@ -80,7 +80,7 @@ class AndroidTVRemoteEntity(RemoteEntity):
self.async_write_ha_state()
@callback
def is_available_updated(is_available: bool) -> None:
def is_available_updated(is_available: bool, exc: Exception | None) -> None:
if is_available:
_LOGGER.info(
"Reconnected to %s at %s",
@@ -89,9 +89,10 @@ class AndroidTVRemoteEntity(RemoteEntity):
)
else:
_LOGGER.warning(
"Disconnected from %s at %s",
"Disconnected from %s at %s due to error: %s",
self._name,
self._host,
exc,
)
self._attr_available = is_available
self.async_write_ha_state()

View File

@@ -333,7 +333,7 @@ amcrest==1.9.7
androidtv[async]==0.0.70
# homeassistant.components.androidtv_remote
androidtvremote2==0.0.5
androidtvremote2==0.0.6
# homeassistant.components.anel_pwrctrl
anel_pwrctrl-homeassistant==0.0.1.dev2

View File

@@ -308,7 +308,7 @@ ambiclimate==0.2.1
androidtv[async]==0.0.70
# homeassistant.components.androidtv_remote
androidtvremote2==0.0.5
androidtvremote2==0.0.6
# homeassistant.components.anthemav
anthemav==1.4.1