diff --git a/custom_components/battery_notes/__init__.py b/custom_components/battery_notes/__init__.py index 5e0ca54a..481ad918 100644 --- a/custom_components/battery_notes/__init__.py +++ b/custom_components/battery_notes/__init__.py @@ -398,7 +398,7 @@ async def handle_battery_last_reported(call): device: BatteryNotesDevice for device in hass.data[DOMAIN][DATA].devices.values(): - if device.coordinator.last_reported: + if device.coordinator.device_id and device.coordinator.last_reported: time_since_lastreported = ( datetime.fromisoformat(str(datetime.utcnow()) + "+00:00") - device.coordinator.last_reported