mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
Improve multipan debug logging (#94580)
This commit is contained in:
parent
6a75f69e0f
commit
bd156bb129
@ -96,19 +96,29 @@ class MultiprotocolAddonManager(AddonManager):
|
|||||||
) -> None:
|
) -> None:
|
||||||
"""Register a multipan platform."""
|
"""Register a multipan platform."""
|
||||||
self._platforms[integration_domain] = platform
|
self._platforms[integration_domain] = platform
|
||||||
if self._channel is not None or not await platform.async_using_multipan(hass):
|
|
||||||
|
channel = await platform.async_get_channel(hass)
|
||||||
|
using_multipan = await platform.async_using_multipan(hass)
|
||||||
|
|
||||||
|
_LOGGER.info(
|
||||||
|
"Registering new multipan platform '%s', using multipan: %s, channel: %s",
|
||||||
|
integration_domain,
|
||||||
|
using_multipan,
|
||||||
|
channel,
|
||||||
|
)
|
||||||
|
|
||||||
|
if self._channel is not None or not using_multipan:
|
||||||
return
|
return
|
||||||
|
|
||||||
new_channel = await platform.async_get_channel(hass)
|
if channel is None:
|
||||||
if new_channel is None:
|
|
||||||
return
|
return
|
||||||
|
|
||||||
_LOGGER.info(
|
_LOGGER.info(
|
||||||
"Setting multipan channel to %s (source: '%s')",
|
"Setting multipan channel to %s (source: '%s')",
|
||||||
new_channel,
|
channel,
|
||||||
integration_domain,
|
integration_domain,
|
||||||
)
|
)
|
||||||
self.async_set_channel(new_channel)
|
self.async_set_channel(channel)
|
||||||
|
|
||||||
async def async_change_channel(
|
async def async_change_channel(
|
||||||
self, channel: int, delay: float
|
self, channel: int, delay: float
|
||||||
|
Loading…
x
Reference in New Issue
Block a user