Skip to content

Commit

Permalink
Remove chatty ESPHome state debug logging (home-assistant#104477)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco authored Nov 25, 2023
1 parent 1c4d7e9 commit df37ee4
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions homeassistant/components/esphome/entry_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,6 @@ def async_update_state(self, state: EntityState) -> None:
current_state_by_type = self.state[state_type]
current_state = current_state_by_type.get(key, _SENTINEL)
subscription_key = (state_type, key)
debug_enabled = _LOGGER.isEnabledFor(logging.DEBUG)
if (
current_state == state
and subscription_key not in stale_state
Expand All @@ -333,21 +332,7 @@ def async_update_state(self, state: EntityState) -> None:
and (cast(SensorInfo, entity_info)).force_update
)
):
if debug_enabled:
_LOGGER.debug(
"%s: ignoring duplicate update with key %s: %s",
self.name,
key,
state,
)
return
if debug_enabled:
_LOGGER.debug(
"%s: dispatching update with key %s: %s",
self.name,
key,
state,
)
stale_state.discard(subscription_key)
current_state_by_type[key] = state
if subscription := self.state_subscriptions.get(subscription_key):
Expand Down

0 comments on commit df37ee4

Please sign in to comment.