Use debug/warning instead of info log level in components [h] (#126033)
parent
53c23dfb6f
commit
b32f40c0fe
|
@ -59,7 +59,7 @@ async def _migrate_old_unique_ids(
|
|||
activity_id = names_to_ids.get(activity_name)
|
||||
|
||||
if activity_id is not None:
|
||||
_LOGGER.info(
|
||||
_LOGGER.debug(
|
||||
"Migrating unique_id from [%s] to [%s]",
|
||||
entity_entry.unique_id,
|
||||
activity_id,
|
||||
|
|
|
@ -210,7 +210,7 @@ def setup(hass: HomeAssistant, base_config: ConfigType) -> bool: # noqa: C901
|
|||
_LOGGER.debug("Reached _adapter_watchdog")
|
||||
event.call_later(hass, WATCHDOG_INTERVAL, _adapter_watchdog_job)
|
||||
if not adapter.initialized:
|
||||
_LOGGER.info("Adapter not initialized; Trying to restart")
|
||||
_LOGGER.warning("Adapter not initialized; Trying to restart")
|
||||
hass.bus.fire(EVENT_HDMI_CEC_UNAVAILABLE)
|
||||
adapter.init()
|
||||
|
||||
|
@ -240,7 +240,7 @@ def setup(hass: HomeAssistant, base_config: ConfigType) -> bool: # noqa: C901
|
|||
KeyPressCommand(mute_key_mapping[att], dst=ADDR_AUDIOSYSTEM)
|
||||
)
|
||||
hdmi_network.send_command(KeyReleaseCommand(dst=ADDR_AUDIOSYSTEM))
|
||||
_LOGGER.info("Audio muted")
|
||||
_LOGGER.debug("Audio muted")
|
||||
else:
|
||||
_LOGGER.warning("Unknown command %s", cmd)
|
||||
|
||||
|
@ -307,7 +307,7 @@ def setup(hass: HomeAssistant, base_config: ConfigType) -> bool: # noqa: C901
|
|||
if not isinstance(addr, (PhysicalAddress,)):
|
||||
addr = PhysicalAddress(addr)
|
||||
hdmi_network.active_source(addr)
|
||||
_LOGGER.info("Selected %s (%s)", call.data[ATTR_DEVICE], addr)
|
||||
_LOGGER.debug("Selected %s (%s)", call.data[ATTR_DEVICE], addr)
|
||||
|
||||
def _update(call: ServiceCall) -> None:
|
||||
"""Update if device update is needed.
|
||||
|
|
|
@ -27,7 +27,7 @@ def setup_platform(
|
|||
) -> None:
|
||||
"""Find and return HDMI devices as switches."""
|
||||
if discovery_info and ATTR_NEW in discovery_info:
|
||||
_LOGGER.info("Setting up HDMI devices %s", discovery_info[ATTR_NEW])
|
||||
_LOGGER.debug("Setting up HDMI devices %s", discovery_info[ATTR_NEW])
|
||||
entities = []
|
||||
for device in discovery_info[ATTR_NEW]:
|
||||
hdmi_device = hass.data[DOMAIN][device]
|
||||
|
|
|
@ -66,7 +66,6 @@ class HitronCODADeviceScanner(DeviceScanner):
|
|||
self._userid = None
|
||||
|
||||
self.success_init = self._update_info()
|
||||
_LOGGER.info("Scanner initialized")
|
||||
|
||||
def scan_devices(self):
|
||||
"""Scan for new devices and return a list with found device IDs."""
|
||||
|
@ -82,7 +81,7 @@ class HitronCODADeviceScanner(DeviceScanner):
|
|||
|
||||
def _login(self):
|
||||
"""Log in to the router. This is required for subsequent api calls."""
|
||||
_LOGGER.info("Logging in to CODA")
|
||||
_LOGGER.debug("Logging in to CODA")
|
||||
|
||||
try:
|
||||
data = [("user", self._username), (self._type, self._password)]
|
||||
|
@ -102,7 +101,7 @@ class HitronCODADeviceScanner(DeviceScanner):
|
|||
|
||||
def _update_info(self):
|
||||
"""Get ARP from router."""
|
||||
_LOGGER.info("Fetching")
|
||||
_LOGGER.debug("Fetching")
|
||||
|
||||
if self._userid is None and not self._login():
|
||||
_LOGGER.error("Could not obtain a user ID from the router")
|
||||
|
@ -137,5 +136,5 @@ class HitronCODADeviceScanner(DeviceScanner):
|
|||
|
||||
self.last_results = last_results
|
||||
|
||||
_LOGGER.info("Request successful")
|
||||
_LOGGER.debug("Request successful")
|
||||
return True
|
||||
|
|
|
@ -409,7 +409,7 @@ async def async_unload_entry(hass: HomeAssistant, entry: HomeKitConfigEntry) ->
|
|||
break
|
||||
|
||||
if not logged_shutdown_wait:
|
||||
_LOGGER.info("Waiting for the HomeKit server to shutdown")
|
||||
_LOGGER.debug("Waiting for the HomeKit server to shutdown")
|
||||
logged_shutdown_wait = True
|
||||
|
||||
await asyncio.sleep(PORT_CLEANUP_CHECK_INTERVAL_SECS)
|
||||
|
|
|
@ -453,7 +453,7 @@ class Camera(HomeAccessory, PyhapCamera): # type: ignore[misc]
|
|||
_LOGGER.error("Failed to open ffmpeg stream")
|
||||
return False
|
||||
|
||||
_LOGGER.info(
|
||||
_LOGGER.debug(
|
||||
"[%s] Started stream process - PID %d",
|
||||
session_info["id"],
|
||||
stream.process.pid,
|
||||
|
@ -528,11 +528,11 @@ class Camera(HomeAccessory, PyhapCamera): # type: ignore[misc]
|
|||
self._async_stop_ffmpeg_watch(session_id)
|
||||
|
||||
if not pid_is_alive(stream.process.pid):
|
||||
_LOGGER.info("[%s] Stream already stopped", session_id)
|
||||
_LOGGER.warning("[%s] Stream already stopped", session_id)
|
||||
return
|
||||
|
||||
for shutdown_method in ("close", "kill"):
|
||||
_LOGGER.info("[%s] %s stream", session_id, shutdown_method)
|
||||
_LOGGER.debug("[%s] %s stream", session_id, shutdown_method)
|
||||
try:
|
||||
await getattr(stream, shutdown_method)()
|
||||
except Exception:
|
||||
|
|
|
@ -253,7 +253,7 @@ class OpeningDeviceBase(HomeAccessory):
|
|||
|
||||
def set_tilt(self, value: float) -> None:
|
||||
"""Set tilt to value if call came from HomeKit."""
|
||||
_LOGGER.info("%s: Set tilt to %d", self.entity_id, value)
|
||||
_LOGGER.debug("%s: Set tilt to %d", self.entity_id, value)
|
||||
|
||||
# HomeKit sends values between -90 and 90.
|
||||
# We'll have to normalize to [0,100]
|
||||
|
|
|
@ -433,7 +433,7 @@ class HKDevice:
|
|||
continue
|
||||
|
||||
if self.config_entry.entry_id not in device.config_entries:
|
||||
_LOGGER.info(
|
||||
_LOGGER.warning(
|
||||
(
|
||||
"Found candidate device for %s:aid:%s, but owned by a different"
|
||||
" config entry, skipping"
|
||||
|
@ -443,7 +443,7 @@ class HKDevice:
|
|||
)
|
||||
continue
|
||||
|
||||
_LOGGER.info(
|
||||
_LOGGER.debug(
|
||||
"Migrating device identifiers for %s:aid:%s",
|
||||
self.unique_id,
|
||||
accessory.aid,
|
||||
|
@ -904,7 +904,7 @@ class HKDevice:
|
|||
return
|
||||
|
||||
if self._polling_lock_warned:
|
||||
_LOGGER.info(
|
||||
_LOGGER.warning(
|
||||
(
|
||||
"HomeKit device no longer detecting back pressure - not"
|
||||
" skipping poll: %s"
|
||||
|
|
|
@ -52,7 +52,6 @@ class HomematicipAlarmControlPanelEntity(AlarmControlPanelEntity):
|
|||
def __init__(self, hap: HomematicipHAP) -> None:
|
||||
"""Initialize the alarm control panel."""
|
||||
self._home: AsyncHome = hap.home
|
||||
_LOGGER.info("Setting up %s", self.name)
|
||||
|
||||
@property
|
||||
def device_info(self) -> DeviceInfo:
|
||||
|
|
|
@ -43,10 +43,10 @@ class HomematicipCloudFlowHandler(ConfigFlow, domain=DOMAIN):
|
|||
self.auth = HomematicipAuth(self.hass, user_input)
|
||||
connected = await self.auth.async_setup()
|
||||
if connected:
|
||||
_LOGGER.info("Connection to HomematicIP Cloud established")
|
||||
_LOGGER.debug("Connection to HomematicIP Cloud established")
|
||||
return await self.async_step_link()
|
||||
|
||||
_LOGGER.info("Connection to HomematicIP Cloud failed")
|
||||
_LOGGER.debug("Connection to HomematicIP Cloud failed")
|
||||
errors["base"] = "invalid_sgtin_or_pin"
|
||||
|
||||
return self.async_show_form(
|
||||
|
@ -69,7 +69,7 @@ class HomematicipCloudFlowHandler(ConfigFlow, domain=DOMAIN):
|
|||
if pressed:
|
||||
authtoken = await self.auth.async_register()
|
||||
if authtoken:
|
||||
_LOGGER.info("Write config entry for HomematicIP Cloud")
|
||||
_LOGGER.debug("Write config entry for HomematicIP Cloud")
|
||||
return self.async_create_entry(
|
||||
title=self.auth.config[HMIPC_HAPID],
|
||||
data={
|
||||
|
@ -92,7 +92,7 @@ class HomematicipCloudFlowHandler(ConfigFlow, domain=DOMAIN):
|
|||
await self.async_set_unique_id(hapid)
|
||||
self._abort_if_unique_id_configured()
|
||||
|
||||
_LOGGER.info("Imported authentication for %s", hapid)
|
||||
_LOGGER.debug("Imported authentication for %s", hapid)
|
||||
return self.async_create_entry(
|
||||
title=hapid,
|
||||
data={HMIPC_AUTHTOKEN: authtoken, HMIPC_HAPID: hapid, HMIPC_NAME: name},
|
||||
|
|
|
@ -95,7 +95,6 @@ class HomematicipGenericEntity(Entity):
|
|||
self.functional_channel = self.get_current_channel()
|
||||
# Marker showing that the HmIP device hase been removed.
|
||||
self.hmip_device_removed = False
|
||||
_LOGGER.info("Setting up %s (%s)", self.name, self._device.modelType)
|
||||
|
||||
@property
|
||||
def device_info(self) -> DeviceInfo | None:
|
||||
|
|
|
@ -104,7 +104,7 @@ class HomematicipHAP:
|
|||
_LOGGER.error("Error connecting with HomematicIP Cloud: %s", err)
|
||||
return False
|
||||
|
||||
_LOGGER.info(
|
||||
_LOGGER.debug(
|
||||
"Connected to HomematicIP with HAP %s", self.config_entry.unique_id
|
||||
)
|
||||
|
||||
|
@ -220,7 +220,7 @@ class HomematicipHAP:
|
|||
if self._retry_task is not None:
|
||||
self._retry_task.cancel()
|
||||
await self.home.disable_events()
|
||||
_LOGGER.info("Closed connection to HomematicIP cloud server")
|
||||
_LOGGER.debug("Closed connection to HomematicIP cloud server")
|
||||
await self.hass.config_entries.async_unload_platforms(
|
||||
self.config_entry, PLATFORMS
|
||||
)
|
||||
|
|
|
@ -65,7 +65,7 @@ def setup_platform(
|
|||
_LOGGER.error("Connection to %s at %s failed: %s", name, host, msg)
|
||||
raise PlatformNotReady from msg
|
||||
|
||||
_LOGGER.info("Connection to %s at %s established", name, host)
|
||||
_LOGGER.debug("Connection to %s at %s established", name, host)
|
||||
|
||||
add_entities([HorizonDevice(client, name, keys)], True)
|
||||
|
||||
|
|
|
@ -209,7 +209,7 @@ class Router:
|
|||
else:
|
||||
_LOGGER.debug("failed")
|
||||
return
|
||||
_LOGGER.info(
|
||||
_LOGGER.warning(
|
||||
"%s requires authorization, excluding from future updates", key
|
||||
)
|
||||
self.subscriptions.pop(key)
|
||||
|
@ -221,7 +221,7 @@ class Router:
|
|||
exc, (ResponseErrorNotSupportedException, ExpatError)
|
||||
) and exc.code not in (-1, 100006):
|
||||
raise
|
||||
_LOGGER.info(
|
||||
_LOGGER.warning(
|
||||
"%s apparently not supported by device, excluding from future updates",
|
||||
key,
|
||||
)
|
||||
|
@ -559,12 +559,12 @@ async def async_migrate_entry(hass: HomeAssistant, config_entry: ConfigEntry) ->
|
|||
if isinstance(recipient, str):
|
||||
options[CONF_RECIPIENT] = [x.strip() for x in recipient.split(",")]
|
||||
hass.config_entries.async_update_entry(config_entry, options=options, version=2)
|
||||
_LOGGER.info("Migrated config entry to version %d", config_entry.version)
|
||||
_LOGGER.debug("Migrated config entry to version %d", config_entry.version)
|
||||
if config_entry.version == 2:
|
||||
data = dict(config_entry.data)
|
||||
data[CONF_MAC] = []
|
||||
hass.config_entries.async_update_entry(config_entry, data=data, version=3)
|
||||
_LOGGER.info("Migrated config entry to version %d", config_entry.version)
|
||||
_LOGGER.debug("Migrated config entry to version %d", config_entry.version)
|
||||
# There can be no longer needed *_from_yaml data and options things left behind
|
||||
# from pre-2022.4ish; they can be removed while at it when/if we eventually bump and
|
||||
# migrate to version > 3 for some other reason.
|
||||
|
|
Loading…
Reference in New Issue