Use debug/warning instead of info log level in components [o] (#126138)
This commit is contained in:
parent
622e9aa3dc
commit
bc8929d37f
9 changed files with 16 additions and 16 deletions
|
@ -40,7 +40,7 @@ async def async_migrate_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
||||||
entry, unique_id=format_mac(device_mac), version=2
|
entry, unique_id=format_mac(device_mac), version=2
|
||||||
)
|
)
|
||||||
|
|
||||||
LOGGER.info("Migration to version %s successful", entry.version)
|
LOGGER.debug("Migration to version %s successful", entry.version)
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
|
@ -106,7 +106,7 @@ class ObihaiServiceSensors(SensorEntity):
|
||||||
|
|
||||||
if not self.requester.available:
|
if not self.requester.available:
|
||||||
self.requester.available = True
|
self.requester.available = True
|
||||||
LOGGER.info("Connection restored")
|
LOGGER.warning("Connection restored")
|
||||||
self._attr_available = True
|
self._attr_available = True
|
||||||
|
|
||||||
except RequestException as exc:
|
except RequestException as exc:
|
||||||
|
|
|
@ -78,7 +78,7 @@ class OneWireEntity(Entity):
|
||||||
else:
|
else:
|
||||||
if not self._last_update_success:
|
if not self._last_update_success:
|
||||||
self._last_update_success = True
|
self._last_update_success = True
|
||||||
_LOGGER.info("Fetching %s data recovered", self.name)
|
_LOGGER.debug("Fetching %s data recovered", self.name)
|
||||||
if self.entity_description.read_mode == READ_MODE_INT:
|
if self.entity_description.read_mode == READ_MODE_INT:
|
||||||
self._state = int(self._value_raw)
|
self._state = int(self._value_raw)
|
||||||
elif self.entity_description.read_mode == READ_MODE_BOOL:
|
elif self.entity_description.read_mode == READ_MODE_BOOL:
|
||||||
|
|
|
@ -165,7 +165,7 @@ class EventManager:
|
||||||
|
|
||||||
if not (parser := PARSERS.get(topic)):
|
if not (parser := PARSERS.get(topic)):
|
||||||
if topic not in UNHANDLED_TOPICS:
|
if topic not in UNHANDLED_TOPICS:
|
||||||
LOGGER.info(
|
LOGGER.warning(
|
||||||
"%s: No registered handler for event from %s: %s",
|
"%s: No registered handler for event from %s: %s",
|
||||||
self.name,
|
self.name,
|
||||||
unique_id,
|
unique_id,
|
||||||
|
@ -177,7 +177,7 @@ class EventManager:
|
||||||
event = await parser(unique_id, msg)
|
event = await parser(unique_id, msg)
|
||||||
|
|
||||||
if not event:
|
if not event:
|
||||||
LOGGER.info(
|
LOGGER.warning(
|
||||||
"%s: Unable to parse event from %s: %s", self.name, unique_id, msg
|
"%s: Unable to parse event from %s: %s", self.name, unique_id, msg
|
||||||
)
|
)
|
||||||
return
|
return
|
||||||
|
|
|
@ -51,7 +51,7 @@ class OpenUvBinarySensor(OpenUvEntity, BinarySensorEntity):
|
||||||
|
|
||||||
for key in ("from_time", "to_time", "from_uv", "to_uv"):
|
for key in ("from_time", "to_time", "from_uv", "to_uv"):
|
||||||
if not data.get(key):
|
if not data.get(key):
|
||||||
LOGGER.info("Skipping update due to missing data: %s", key)
|
LOGGER.warning("Skipping update due to missing data: %s", key)
|
||||||
return
|
return
|
||||||
|
|
||||||
if self.entity_description.key == TYPE_PROTECTION_WINDOW:
|
if self.entity_description.key == TYPE_PROTECTION_WINDOW:
|
||||||
|
|
|
@ -88,7 +88,7 @@ async def async_migrate_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
||||||
version=CONFIG_FLOW_VERSION,
|
version=CONFIG_FLOW_VERSION,
|
||||||
)
|
)
|
||||||
|
|
||||||
_LOGGER.info("Migration to version %s successful", CONFIG_FLOW_VERSION)
|
_LOGGER.debug("Migration to version %s successful", CONFIG_FLOW_VERSION)
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
|
@ -59,7 +59,7 @@ def setup_platform(
|
||||||
switch_conf = config.get(CONF_SWITCHES, [config])
|
switch_conf = config.get(CONF_SWITCHES, [config])
|
||||||
|
|
||||||
if config.get(CONF_DISCOVERY):
|
if config.get(CONF_DISCOVERY):
|
||||||
_LOGGER.info("Discovering S20 switches")
|
_LOGGER.debug("Discovering S20 switches")
|
||||||
switch_data.update(discover())
|
switch_data.update(discover())
|
||||||
|
|
||||||
for switch in switch_conf:
|
for switch in switch_conf:
|
||||||
|
@ -70,7 +70,7 @@ def setup_platform(
|
||||||
switches.append(
|
switches.append(
|
||||||
S20Switch(data.get(CONF_NAME), S20(host, mac=data.get(CONF_MAC)))
|
S20Switch(data.get(CONF_NAME), S20(host, mac=data.get(CONF_MAC)))
|
||||||
)
|
)
|
||||||
_LOGGER.info("Initialized S20 at %s", host)
|
_LOGGER.debug("Initialized S20 at %s", host)
|
||||||
except S20Exception:
|
except S20Exception:
|
||||||
_LOGGER.error("S20 at %s couldn't be initialized", host)
|
_LOGGER.error("S20 at %s couldn't be initialized", host)
|
||||||
|
|
||||||
|
|
|
@ -261,7 +261,7 @@ class OwnTracksContext:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
if self.max_gps_accuracy is not None and acc > self.max_gps_accuracy:
|
if self.max_gps_accuracy is not None and acc > self.max_gps_accuracy:
|
||||||
_LOGGER.info(
|
_LOGGER.warning(
|
||||||
"Ignoring %s update because expected GPS accuracy %s is not met: %s",
|
"Ignoring %s update because expected GPS accuracy %s is not met: %s",
|
||||||
message["_type"],
|
message["_type"],
|
||||||
self.max_gps_accuracy,
|
self.max_gps_accuracy,
|
||||||
|
|
|
@ -214,14 +214,14 @@ async def _async_transition_message_enter(hass, context, message, location):
|
||||||
beacons = context.mobile_beacons_active[dev_id]
|
beacons = context.mobile_beacons_active[dev_id]
|
||||||
if location not in beacons:
|
if location not in beacons:
|
||||||
beacons.add(location)
|
beacons.add(location)
|
||||||
_LOGGER.info("Added beacon %s", location)
|
_LOGGER.debug("Added beacon %s", location)
|
||||||
context.async_see_beacons(hass, dev_id, kwargs)
|
context.async_see_beacons(hass, dev_id, kwargs)
|
||||||
else:
|
else:
|
||||||
# Normal region
|
# Normal region
|
||||||
regions = context.regions_entered[dev_id]
|
regions = context.regions_entered[dev_id]
|
||||||
if location not in regions:
|
if location not in regions:
|
||||||
regions.append(location)
|
regions.append(location)
|
||||||
_LOGGER.info("Enter region %s", location)
|
_LOGGER.debug("Enter region %s", location)
|
||||||
_set_gps_from_zone(kwargs, location, zone)
|
_set_gps_from_zone(kwargs, location, zone)
|
||||||
context.async_see(**kwargs)
|
context.async_see(**kwargs)
|
||||||
context.async_see_beacons(hass, dev_id, kwargs)
|
context.async_see_beacons(hass, dev_id, kwargs)
|
||||||
|
@ -238,7 +238,7 @@ async def _async_transition_message_leave(hass, context, message, location):
|
||||||
beacons = context.mobile_beacons_active[dev_id]
|
beacons = context.mobile_beacons_active[dev_id]
|
||||||
if location in beacons:
|
if location in beacons:
|
||||||
beacons.remove(location)
|
beacons.remove(location)
|
||||||
_LOGGER.info("Remove beacon %s", location)
|
_LOGGER.debug("Remove beacon %s", location)
|
||||||
context.async_see_beacons(hass, dev_id, kwargs)
|
context.async_see_beacons(hass, dev_id, kwargs)
|
||||||
else:
|
else:
|
||||||
new_region = regions[-1] if regions else None
|
new_region = regions[-1] if regions else None
|
||||||
|
@ -246,12 +246,12 @@ async def _async_transition_message_leave(hass, context, message, location):
|
||||||
# Exit to previous region
|
# Exit to previous region
|
||||||
zone = hass.states.get(f"zone.{slugify(new_region)}")
|
zone = hass.states.get(f"zone.{slugify(new_region)}")
|
||||||
_set_gps_from_zone(kwargs, new_region, zone)
|
_set_gps_from_zone(kwargs, new_region, zone)
|
||||||
_LOGGER.info("Exit to %s", new_region)
|
_LOGGER.debug("Exit to %s", new_region)
|
||||||
context.async_see(**kwargs)
|
context.async_see(**kwargs)
|
||||||
context.async_see_beacons(hass, dev_id, kwargs)
|
context.async_see_beacons(hass, dev_id, kwargs)
|
||||||
return
|
return
|
||||||
|
|
||||||
_LOGGER.info("Exit to GPS")
|
_LOGGER.debug("Exit to GPS")
|
||||||
|
|
||||||
# Check for GPS accuracy
|
# Check for GPS accuracy
|
||||||
if context.async_valid_accuracy(message):
|
if context.async_valid_accuracy(message):
|
||||||
|
@ -335,7 +335,7 @@ async def async_handle_waypoints_message(hass, context, message):
|
||||||
|
|
||||||
wayps = message.get("waypoints", [message])
|
wayps = message.get("waypoints", [message])
|
||||||
|
|
||||||
_LOGGER.info("Got %d waypoints from %s", len(wayps), message["topic"])
|
_LOGGER.debug("Got %d waypoints from %s", len(wayps), message["topic"])
|
||||||
|
|
||||||
name_base = " ".join(_parse_topic(message["topic"], context.mqtt_topic))
|
name_base = " ".join(_parse_topic(message["topic"], context.mqtt_topic))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue