mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Use debug/warning instead of info log level in components [r] (#126140)
This commit is contained in:
parent
4efa147a2b
commit
adcb541b4b
@ -83,7 +83,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||||||
if not person.controllers and not person.base_stations:
|
if not person.controllers and not person.base_stations:
|
||||||
_LOGGER.error("No Rachio devices found in account %s", person.username)
|
_LOGGER.error("No Rachio devices found in account %s", person.username)
|
||||||
return False
|
return False
|
||||||
_LOGGER.info(
|
_LOGGER.warning(
|
||||||
(
|
(
|
||||||
"%d Rachio device(s) found; The url %s must be accessible from the internet"
|
"%d Rachio device(s) found; The url %s must be accessible from the internet"
|
||||||
" in order to receive updates"
|
" in order to receive updates"
|
||||||
|
@ -164,7 +164,7 @@ class RachioPerson:
|
|||||||
# rachio hands us back a dict
|
# rachio hands us back a dict
|
||||||
if isinstance(webhooks, dict):
|
if isinstance(webhooks, dict):
|
||||||
if webhooks.get("code") == PERMISSION_ERROR:
|
if webhooks.get("code") == PERMISSION_ERROR:
|
||||||
_LOGGER.info(
|
_LOGGER.warning(
|
||||||
(
|
(
|
||||||
"Not adding controller '%s', only controllers owned by '%s'"
|
"Not adding controller '%s', only controllers owned by '%s'"
|
||||||
" may be added"
|
" may be added"
|
||||||
@ -195,7 +195,7 @@ class RachioPerson:
|
|||||||
for base in base_stations
|
for base in base_stations
|
||||||
)
|
)
|
||||||
|
|
||||||
_LOGGER.info('Using Rachio API as user "%s"', self.username)
|
_LOGGER.debug('Using Rachio API as user "%s"', self.username)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def user_id(self) -> str | None:
|
def user_id(self) -> str | None:
|
||||||
@ -334,7 +334,7 @@ class RachioIro:
|
|||||||
def stop_watering(self) -> None:
|
def stop_watering(self) -> None:
|
||||||
"""Stop watering all zones connected to this controller."""
|
"""Stop watering all zones connected to this controller."""
|
||||||
self.rachio.device.stop_water(self.controller_id)
|
self.rachio.device.stop_water(self.controller_id)
|
||||||
_LOGGER.info("Stopped watering of all zones on %s", self)
|
_LOGGER.debug("Stopped watering of all zones on %s", self)
|
||||||
|
|
||||||
def pause_watering(self, duration) -> None:
|
def pause_watering(self, duration) -> None:
|
||||||
"""Pause watering on this controller."""
|
"""Pause watering on this controller."""
|
||||||
|
@ -291,7 +291,7 @@ async def async_setup_entry( # noqa: C901
|
|||||||
else:
|
else:
|
||||||
data = await controller.zones.all(details=True, include_inactive=True)
|
data = await controller.zones.all(details=True, include_inactive=True)
|
||||||
except UnknownAPICallError:
|
except UnknownAPICallError:
|
||||||
LOGGER.info(
|
LOGGER.warning(
|
||||||
"Skipping unsupported API call for controller %s: %s",
|
"Skipping unsupported API call for controller %s: %s",
|
||||||
controller.name,
|
controller.name,
|
||||||
api_category,
|
api_category,
|
||||||
@ -518,7 +518,7 @@ async def async_migrate_entry(
|
|||||||
|
|
||||||
await er.async_migrate_entries(hass, entry.entry_id, migrate_unique_id)
|
await er.async_migrate_entries(hass, entry.entry_id, migrate_unique_id)
|
||||||
|
|
||||||
LOGGER.info("Migration to version %s successful", version)
|
LOGGER.debug("Migration to version %s successful", version)
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@ def async_finish_entity_domain_replacements(
|
|||||||
|
|
||||||
old_entity_id = registry_entry.entity_id
|
old_entity_id = registry_entry.entity_id
|
||||||
if strategy.remove_old_entity:
|
if strategy.remove_old_entity:
|
||||||
LOGGER.info('Removing old entity: "%s"', old_entity_id)
|
LOGGER.debug('Removing old entity: "%s"', old_entity_id)
|
||||||
ent_reg.async_remove(old_entity_id)
|
ent_reg.async_remove(old_entity_id)
|
||||||
|
|
||||||
|
|
||||||
|
@ -109,6 +109,6 @@ async def async_migrate_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||||||
|
|
||||||
await er.async_migrate_entries(hass, entry.entry_id, migrate_unique_id)
|
await er.async_migrate_entries(hass, entry.entry_id, migrate_unique_id)
|
||||||
|
|
||||||
LOGGER.info("Migration to version %s successful", version)
|
LOGGER.debug("Migration to version %s successful", version)
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
@ -58,7 +58,7 @@ def setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
|||||||
stored_rtm_config = RememberTheMilkConfiguration(hass)
|
stored_rtm_config = RememberTheMilkConfiguration(hass)
|
||||||
for rtm_config in config[DOMAIN]:
|
for rtm_config in config[DOMAIN]:
|
||||||
account_name = rtm_config[CONF_NAME]
|
account_name = rtm_config[CONF_NAME]
|
||||||
_LOGGER.info("Adding Remember the milk account %s", account_name)
|
_LOGGER.debug("Adding Remember the milk account %s", account_name)
|
||||||
api_key = rtm_config[CONF_API_KEY]
|
api_key = rtm_config[CONF_API_KEY]
|
||||||
shared_secret = rtm_config[CONF_SHARED_SECRET]
|
shared_secret = rtm_config[CONF_SHARED_SECRET]
|
||||||
token = stored_rtm_config.get_token(account_name)
|
token = stored_rtm_config.get_token(account_name)
|
||||||
|
@ -264,7 +264,7 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
|||||||
|
|
||||||
async def connect():
|
async def connect():
|
||||||
"""Set up connection and hook it into HA for reconnect/shutdown."""
|
"""Set up connection and hook it into HA for reconnect/shutdown."""
|
||||||
_LOGGER.info("Initiating Rflink connection")
|
_LOGGER.debug("Initiating Rflink connection")
|
||||||
|
|
||||||
# Rflink create_rflink_connection decides based on the value of host
|
# Rflink create_rflink_connection decides based on the value of host
|
||||||
# (string or None) if serial or tcp mode should be used
|
# (string or None) if serial or tcp mode should be used
|
||||||
@ -311,7 +311,7 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
|||||||
EVENT_HOMEASSISTANT_STOP, lambda x: transport.close()
|
EVENT_HOMEASSISTANT_STOP, lambda x: transport.close()
|
||||||
)
|
)
|
||||||
|
|
||||||
_LOGGER.info("Connected to Rflink")
|
_LOGGER.debug("Connected to Rflink")
|
||||||
|
|
||||||
hass.async_create_task(connect(), eager_start=False)
|
hass.async_create_task(connect(), eager_start=False)
|
||||||
async_dispatcher_connect(hass, SIGNAL_EVENT, event_callback)
|
async_dispatcher_connect(hass, SIGNAL_EVENT, event_callback)
|
||||||
|
@ -231,7 +231,7 @@ async def async_setup_internal(hass: HomeAssistant, entry: ConfigEntry) -> None:
|
|||||||
config = {}
|
config = {}
|
||||||
config[CONF_DEVICE_ID] = device_id
|
config[CONF_DEVICE_ID] = device_id
|
||||||
|
|
||||||
_LOGGER.info(
|
_LOGGER.debug(
|
||||||
"Added device (Device ID: %s Class: %s Sub: %s, Event: %s)",
|
"Added device (Device ID: %s Class: %s Sub: %s, Event: %s)",
|
||||||
event.device.id_string.lower(),
|
event.device.id_string.lower(),
|
||||||
event.device.__class__.__name__,
|
event.device.__class__.__name__,
|
||||||
@ -416,7 +416,7 @@ def find_possible_pt2262_device(device_ids: set[str], device_id: str) -> str | N
|
|||||||
size = i
|
size = i
|
||||||
if size is not None:
|
if size is not None:
|
||||||
size = len(dev_id) - size - 1
|
size = len(dev_id) - size - 1
|
||||||
_LOGGER.info(
|
_LOGGER.debug(
|
||||||
(
|
(
|
||||||
"Found possible device %s for %s "
|
"Found possible device %s for %s "
|
||||||
"with the following configuration:\n"
|
"with the following configuration:\n"
|
||||||
|
@ -55,6 +55,6 @@ async def async_migrate_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||||||
|
|
||||||
await er.async_migrate_entries(hass, entry.entry_id, migrate_unique_id)
|
await er.async_migrate_entries(hass, entry.entry_id, migrate_unique_id)
|
||||||
|
|
||||||
LOGGER.info("Migration to version %s successful", version)
|
LOGGER.debug("Migration to version %s successful", version)
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
@ -133,7 +133,7 @@ async def _migrate_old_unique_ids(hass: HomeAssistant, entry_id: str) -> None:
|
|||||||
existing_entity_id,
|
existing_entity_id,
|
||||||
)
|
)
|
||||||
return None
|
return None
|
||||||
_LOGGER.info("Fixing non string unique id %s", entity_entry.unique_id)
|
_LOGGER.debug("Fixing non string unique id %s", entity_entry.unique_id)
|
||||||
return {"new_unique_id": new_unique_id}
|
return {"new_unique_id": new_unique_id}
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
@ -289,6 +289,6 @@ class RMVDepartureData:
|
|||||||
|
|
||||||
if not self._error_notification and _deps_not_found:
|
if not self._error_notification and _deps_not_found:
|
||||||
self._error_notification = True
|
self._error_notification = True
|
||||||
_LOGGER.info("Destination(s) %s not found", ", ".join(_deps_not_found))
|
_LOGGER.warning("Destination(s) %s not found", ", ".join(_deps_not_found))
|
||||||
|
|
||||||
self.departures = _deps
|
self.departures = _deps
|
||||||
|
@ -52,8 +52,10 @@ def get_service(
|
|||||||
except RocketConnectionException:
|
except RocketConnectionException:
|
||||||
_LOGGER.warning("Unable to connect to Rocket.Chat server at %s", url)
|
_LOGGER.warning("Unable to connect to Rocket.Chat server at %s", url)
|
||||||
except RocketAuthenticationException:
|
except RocketAuthenticationException:
|
||||||
_LOGGER.warning("Rocket.Chat authentication failed for user %s", username)
|
_LOGGER.warning(
|
||||||
_LOGGER.info("Please check your username/password")
|
"Rocket.Chat authentication failed for user %s. Please check your username/password",
|
||||||
|
username,
|
||||||
|
)
|
||||||
|
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
@ -55,5 +55,5 @@ class RaspberryChargerBinarySensor(BinarySensorEntity):
|
|||||||
if value:
|
if value:
|
||||||
_LOGGER.warning(DESCRIPTION_UNDER_VOLTAGE)
|
_LOGGER.warning(DESCRIPTION_UNDER_VOLTAGE)
|
||||||
else:
|
else:
|
||||||
_LOGGER.info(DESCRIPTION_NORMALIZED)
|
_LOGGER.debug(DESCRIPTION_NORMALIZED)
|
||||||
self._attr_is_on = value
|
self._attr_is_on = value
|
||||||
|
@ -68,6 +68,6 @@ async def test_new_detected(
|
|||||||
assert state.state == STATE_OFF
|
assert state.state == STATE_OFF
|
||||||
assert (
|
assert (
|
||||||
binary_sensor.__name__,
|
binary_sensor.__name__,
|
||||||
logging.INFO,
|
logging.DEBUG,
|
||||||
DESCRIPTION_NORMALIZED,
|
DESCRIPTION_NORMALIZED,
|
||||||
) in caplog.record_tuples
|
) in caplog.record_tuples
|
||||||
|
Loading…
x
Reference in New Issue
Block a user