From bd44f107795fe9142026dd8dd18f0109ed91a6b0 Mon Sep 17 00:00:00 2001 From: Filip Marek Date: Fri, 13 Dec 2024 13:09:10 +0100 Subject: [PATCH] deadline attribute in notifications --- custom_components/homeassistantedupage/sensor.py | 1 + 1 file changed, 1 insertion(+) diff --git a/custom_components/homeassistantedupage/sensor.py b/custom_components/homeassistantedupage/sensor.py index 113047d..a9bedf8 100644 --- a/custom_components/homeassistantedupage/sensor.py +++ b/custom_components/homeassistantedupage/sensor.py @@ -149,6 +149,7 @@ def extra_state_attributes(self): attributes[f"event_{i+1}_id"] = event.event_id attributes[f"event_{i+1}_text"] = event.text attributes[f"event_{i+1}_timestamp"] = event.timestamp.strftime("%Y-%m-%d %H:%M:%S") + attributes[f"event_{i+1}_deadline"] = event.additional_data.get("date") if event.additional_data else None author_name = event.author if event.author else "no author" attributes[f"event_{i+1}_author"] = author_name