diff --git a/custom_components/ecole_directe/sensor.py b/custom_components/ecole_directe/sensor.py index 4dd4e9e..64a42ce 100644 --- a/custom_components/ecole_directe/sensor.py +++ b/custom_components/ecole_directe/sensor.py @@ -486,15 +486,13 @@ def extra_state_attributes(self): else: messagerie = self.coordinator.data["messagerie"] - attributes.append({"reçus": messagerie["messagesRecusCount"]}) - attributes.append({"envoyés": messagerie["messagesEnvoyesCount"]}) - attributes.append({"archivés": messagerie["messagesArchivesCount"]}) - attributes.append({"non lu": messagerie["messagesRecusNotReadCount"]}) - attributes.append({"brouillons": messagerie["messagesDraftCount"]}) - return { "updated_at": self.coordinator.last_update_success_time, - "messagerie": attributes, + "reçus": messagerie["messagesRecusCount"], + "envoyés": messagerie["messagesEnvoyesCount"], + "archivés": messagerie["messagesArchivesCount"], + "non lu": messagerie["messagesRecusNotReadCount"], + "brouillons": messagerie["messagesDraftCount"], }