From 110fa881ff3ddccddc662fa620b03c2311742fc4 Mon Sep 17 00:00:00 2001 From: tronikos Date: Fri, 7 Apr 2023 07:06:16 +0000 Subject: [PATCH] Log exception that caused disconnect --- homeassistant/components/androidtv_remote/manifest.json | 2 +- homeassistant/components/androidtv_remote/remote.py | 5 +++-- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/homeassistant/components/androidtv_remote/manifest.json b/homeassistant/components/androidtv_remote/manifest.json index ece0c6a0d33..adbdddfda97 100644 --- a/homeassistant/components/androidtv_remote/manifest.json +++ b/homeassistant/components/androidtv_remote/manifest.json @@ -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."] } diff --git a/homeassistant/components/androidtv_remote/remote.py b/homeassistant/components/androidtv_remote/remote.py index 1c68c92bc68..cddeb6b5e04 100644 --- a/homeassistant/components/androidtv_remote/remote.py +++ b/homeassistant/components/androidtv_remote/remote.py @@ -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() diff --git a/requirements_all.txt b/requirements_all.txt index 07e36a655cc..8855833aec9 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -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 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 58674d4ab0b..6a6cce1c67d 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -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