mirror of
https://github.com/home-assistant/core.git
synced 2025-08-06 06:05:10 +02:00
Info log when Android TV Remote is unavailable (#137794)
This commit is contained in:
@@ -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)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user