Skip to content

Commit

Permalink
Use debug/warning instead of info log level in components [r] (home-a…
Browse files Browse the repository at this point in the history
  • Loading branch information
jpbede authored Sep 17, 2024
1 parent 4efa147 commit adcb541
Show file tree
Hide file tree
Showing 14 changed files with 22 additions and 20 deletions.
2 changes: 1 addition & 1 deletion homeassistant/components/rachio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
if not person.controllers and not person.base_stations:
_LOGGER.error("No Rachio devices found in account %s", person.username)
return False
_LOGGER.info(
_LOGGER.warning(
(
"%d Rachio device(s) found; The url %s must be accessible from the internet"
" in order to receive updates"
Expand Down
6 changes: 3 additions & 3 deletions homeassistant/components/rachio/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def _setup(self, hass: HomeAssistant) -> None:
# rachio hands us back a dict
if isinstance(webhooks, dict):
if webhooks.get("code") == PERMISSION_ERROR:
_LOGGER.info(
_LOGGER.warning(
(
"Not adding controller '%s', only controllers owned by '%s'"
" may be added"
Expand Down Expand Up @@ -195,7 +195,7 @@ def _setup(self, hass: HomeAssistant) -> None:
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
def user_id(self) -> str | None:
Expand Down Expand Up @@ -334,7 +334,7 @@ def list_flex_schedules(self) -> list:
def stop_watering(self) -> None:
"""Stop watering all zones connected to this controller."""
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:
"""Pause watering on this controller."""
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/rainmachine/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ async def async_update(api_category: str) -> dict:
else:
data = await controller.zones.all(details=True, include_inactive=True)
except UnknownAPICallError:
LOGGER.info(
LOGGER.warning(
"Skipping unsupported API call for controller %s: %s",
controller.name,
api_category,
Expand Down Expand Up @@ -518,7 +518,7 @@ def migrate_unique_id(entity_entry: er.RegistryEntry) -> dict[str, Any]:

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

Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/rainmachine/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def async_finish_entity_domain_replacements(

old_entity_id = registry_entry.entity_id
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)


Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/recollect_waste/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,6 @@ def migrate_unique_id(entity_entry: er.RegistryEntry) -> dict[str, Any]:

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
2 changes: 1 addition & 1 deletion homeassistant/components/remember_the_milk/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def setup(hass: HomeAssistant, config: ConfigType) -> bool:
stored_rtm_config = RememberTheMilkConfiguration(hass)
for rtm_config in config[DOMAIN]:
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]
shared_secret = rtm_config[CONF_SHARED_SECRET]
token = stored_rtm_config.get_token(account_name)
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/rflink/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ def reconnect(_: Exception | None = None) -> None:

async def connect():
"""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
# (string or None) if serial or tcp mode should be used
Expand Down Expand Up @@ -311,7 +311,7 @@ async def connect():
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)
async_dispatcher_connect(hass, SIGNAL_EVENT, event_callback)
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/rfxtrx/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ def _add_device(event: rfxtrxmod.RFXtrxEvent, device_id: DeviceTuple) -> None:
config = {}
config[CONF_DEVICE_ID] = device_id

_LOGGER.info(
_LOGGER.debug(
"Added device (Device ID: %s Class: %s Sub: %s, Event: %s)",
event.device.id_string.lower(),
event.device.__class__.__name__,
Expand Down Expand Up @@ -416,7 +416,7 @@ def find_possible_pt2262_device(device_ids: set[str], device_id: str) -> str | N
size = i
if size is not None:
size = len(dev_id) - size - 1
_LOGGER.info(
_LOGGER.debug(
(
"Found possible device %s for %s "
"with the following configuration:\n"
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/ridwell/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,6 @@ def migrate_unique_id(entity_entry: er.RegistryEntry) -> dict[str, Any]:

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
2 changes: 1 addition & 1 deletion homeassistant/components/ring/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def _async_migrator(entity_entry: er.RegistryEntry) -> dict[str, str] | None:
existing_entity_id,
)
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 None

Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/rmvtransport/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,6 @@ async def async_update(self):

if not self._error_notification and _deps_not_found:
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
6 changes: 4 additions & 2 deletions homeassistant/components/rocketchat/notify.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,10 @@ def get_service(
except RocketConnectionException:
_LOGGER.warning("Unable to connect to Rocket.Chat server at %s", url)
except RocketAuthenticationException:
_LOGGER.warning("Rocket.Chat authentication failed for user %s", username)
_LOGGER.info("Please check your username/password")
_LOGGER.warning(
"Rocket.Chat authentication failed for user %s. Please check your username/password",
username,
)

return None

Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/rpi_power/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,5 @@ def update(self) -> None:
if value:
_LOGGER.warning(DESCRIPTION_UNDER_VOLTAGE)
else:
_LOGGER.info(DESCRIPTION_NORMALIZED)
_LOGGER.debug(DESCRIPTION_NORMALIZED)
self._attr_is_on = value
2 changes: 1 addition & 1 deletion tests/components/rpi_power/test_binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,6 @@ async def test_new_detected(
assert state.state == STATE_OFF
assert (
binary_sensor.__name__,
logging.INFO,
logging.DEBUG,
DESCRIPTION_NORMALIZED,
) in caplog.record_tuples

0 comments on commit adcb541

Please sign in to comment.