diff --git a/custom_components/bedste_lectio/sensor.py b/custom_components/bedste_lectio/sensor.py index e8f5838..f534efe 100644 --- a/custom_components/bedste_lectio/sensor.py +++ b/custom_components/bedste_lectio/sensor.py @@ -79,4 +79,8 @@ def native_value(self) -> str: def extra_state_attributes(self) -> dict[str, any]: """Return the state attributes of the entity.""" entries = self.coordinator.data.get("skema") - return get_next_room(entries) + data = get_next_room(entries) + data.update({ + "last_update": datetime.now(), + }) + return data