Fix HomeKit logging None instead of the linked battery sensor (#81860)
This commit is contained in:
parent
9c0a3cdae0
commit
f96a4e2d0f
1 changed files with 1 additions and 1 deletions
|
@ -358,12 +358,12 @@ class HomeAccessory(Accessory): # type: ignore[misc]
|
|||
if state is not None:
|
||||
battery_found = state.state
|
||||
else:
|
||||
self.linked_battery_sensor = None
|
||||
_LOGGER.warning(
|
||||
"%s: Battery sensor state missing: %s",
|
||||
self.entity_id,
|
||||
self.linked_battery_sensor,
|
||||
)
|
||||
self.linked_battery_sensor = None
|
||||
|
||||
if not battery_found:
|
||||
return
|
||||
|
|
Loading…
Add table
Reference in a new issue