Info log when Android TV Remote is unavailable (#137794)

This commit is contained in:
tronikos 2025-02-07 23:59:20 -08:00 committed by GitHub
parent 6c74824ac1
commit 5f5ad34176
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -35,16 +35,12 @@ async def async_setup_entry(
@callback @callback
def is_available_updated(is_available: bool) -> None: def is_available_updated(is_available: bool) -> None:
if is_available: _LOGGER.info(
_LOGGER.info( "%s %s at %s",
"Reconnected to %s at %s", entry.data[CONF_NAME], entry.data[CONF_HOST] "Reconnected to" if is_available else "Disconnected from",
) entry.data[CONF_NAME],
else: entry.data[CONF_HOST],
_LOGGER.warning( )
"Disconnected from %s at %s",
entry.data[CONF_NAME],
entry.data[CONF_HOST],
)
api.add_is_available_updated_callback(is_available_updated) api.add_is_available_updated_callback(is_available_updated)