Skip to content

Commit 12003bd

Browse files
Fix battery last reported on entities
1 parent 767d020 commit 12003bd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

custom_components/battery_notes/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ async def handle_battery_last_reported(call):
398398

399399
device: BatteryNotesDevice
400400
for device in hass.data[DOMAIN][DATA].devices.values():
401-
if device.coordinator.last_reported and device.coordinator.last_reported_level:
401+
if device.coordinator.wrapped_battery and device.coordinator.last_reported:
402402
time_since_lastreported = (
403403
datetime.fromisoformat(str(datetime.utcnow()) + "+00:00")
404404
- device.coordinator.last_reported

0 commit comments

Comments
 (0)