Skip to content

Commit

Permalink
Fix messagerie
Browse files Browse the repository at this point in the history
  • Loading branch information
Giga77 committed Oct 4, 2024
1 parent 563505c commit be337d0
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions custom_components/ecole_directe/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -485,11 +485,16 @@ def extra_state_attributes(self):
]
else:
messagerie = self.coordinator.data["messagerie"]
attributes.append(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,
"formulaires": attributes,
"messagerie": attributes,
}


Expand Down

0 comments on commit be337d0

Please sign in to comment.