mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 09:47:13 +00:00
Fix HomeKit logging None instead of the linked battery sensor (#81860)
This commit is contained in:
parent
9c0a3cdae0
commit
f96a4e2d0f
@ -358,12 +358,12 @@ class HomeAccessory(Accessory): # type: ignore[misc]
|
|||||||
if state is not None:
|
if state is not None:
|
||||||
battery_found = state.state
|
battery_found = state.state
|
||||||
else:
|
else:
|
||||||
self.linked_battery_sensor = None
|
|
||||||
_LOGGER.warning(
|
_LOGGER.warning(
|
||||||
"%s: Battery sensor state missing: %s",
|
"%s: Battery sensor state missing: %s",
|
||||||
self.entity_id,
|
self.entity_id,
|
||||||
self.linked_battery_sensor,
|
self.linked_battery_sensor,
|
||||||
)
|
)
|
||||||
|
self.linked_battery_sensor = None
|
||||||
|
|
||||||
if not battery_found:
|
if not battery_found:
|
||||||
return
|
return
|
||||||
|
Loading…
x
Reference in New Issue
Block a user