mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 14:17:45 +00:00
Fix logging for Shelly climate platform (#62264)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
This commit is contained in:
parent
4572fec680
commit
90345b1cf2
@ -69,7 +69,6 @@ async def async_setup_climate_entities(
|
|||||||
) -> None:
|
) -> None:
|
||||||
"""Set up online climate devices."""
|
"""Set up online climate devices."""
|
||||||
|
|
||||||
_LOGGER.info("Setup online climate device %s", wrapper.name)
|
|
||||||
device_block: Block | None = None
|
device_block: Block | None = None
|
||||||
sensor_block: Block | None = None
|
sensor_block: Block | None = None
|
||||||
|
|
||||||
@ -82,6 +81,7 @@ async def async_setup_climate_entities(
|
|||||||
sensor_block = block
|
sensor_block = block
|
||||||
|
|
||||||
if sensor_block and device_block:
|
if sensor_block and device_block:
|
||||||
|
_LOGGER.debug("Setup online climate device %s", wrapper.name)
|
||||||
async_add_entities([BlockSleepingClimate(wrapper, sensor_block, device_block)])
|
async_add_entities([BlockSleepingClimate(wrapper, sensor_block, device_block)])
|
||||||
|
|
||||||
|
|
||||||
@ -92,7 +92,6 @@ async def async_restore_climate_entities(
|
|||||||
wrapper: BlockDeviceWrapper,
|
wrapper: BlockDeviceWrapper,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Restore sleeping climate devices."""
|
"""Restore sleeping climate devices."""
|
||||||
_LOGGER.info("Setup sleeping climate device %s", wrapper.name)
|
|
||||||
|
|
||||||
ent_reg = await entity_registry.async_get_registry(hass)
|
ent_reg = await entity_registry.async_get_registry(hass)
|
||||||
entries = entity_registry.async_entries_for_config_entry(
|
entries = entity_registry.async_entries_for_config_entry(
|
||||||
@ -104,6 +103,7 @@ async def async_restore_climate_entities(
|
|||||||
if entry.domain != CLIMATE_DOMAIN:
|
if entry.domain != CLIMATE_DOMAIN:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
_LOGGER.debug("Setup sleeping climate device %s", wrapper.name)
|
||||||
_LOGGER.debug("Found entry %s [%s]", entry.original_name, entry.domain)
|
_LOGGER.debug("Found entry %s [%s]", entry.original_name, entry.domain)
|
||||||
async_add_entities([BlockSleepingClimate(wrapper, None, None, entry)])
|
async_add_entities([BlockSleepingClimate(wrapper, None, None, entry)])
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user