Skip to content

Commit 2aac6fb

Browse files
Set last reported when battery low is set on wrapped battery low (#4116)
1 parent 68ca3a6 commit 2aac6fb

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

custom_components/battery_notes/binary_sensor.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
Template,
5454
TemplateStateFromEntityId,
5555
)
56+
from homeassistant.util.dt import utcnow as utcnow_no_timezone
5657

5758
from .common import validate_is_float
5859
from .const import (
@@ -672,6 +673,7 @@ async def async_state_changed_listener(
672673
self.async_write_ha_state()
673674
return
674675

676+
self.coordinator.last_reported = utcnow_no_timezone()
675677
self.coordinator.battery_low_binary_state = (
676678
wrapped_battery_low_state.state == "on"
677679
)

0 commit comments

Comments
 (0)