We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1dab971 commit 9f8dda4Copy full SHA for 9f8dda4
custom_components/battery_notes/binary_sensor.py
@@ -238,7 +238,7 @@ async def async_state_changed_listener(
238
239
if (
240
wrapped_battery_state := self.hass.states.get(self._battery_entity_id)
241
- ) is None or wrapped_battery_state.state == STATE_UNAVAILABLE:
+ ) is None or wrapped_battery_state.state in [STATE_UNAVAILABLE, STATE_UNKNOWN]:
242
self._attr_is_on = False
243
self._attr_available = True
244
return
0 commit comments