mirror of
https://github.com/Electric-Special/ha-core.git
synced 2026-03-21 03:03:17 +01:00
Ignore None keys in meteo_france extra state attributes (#163297)
This commit is contained in:
@@ -333,10 +333,14 @@ class MeteoFranceAlertSensor(MeteoFranceSensor[CurrentPhenomenons]):
|
||||
)
|
||||
|
||||
@property
|
||||
def extra_state_attributes(self):
|
||||
def extra_state_attributes(self) -> dict[str, Any]:
|
||||
"""Return the state attributes."""
|
||||
return {
|
||||
**readable_phenomenons_dict(self.coordinator.data.phenomenons_max_colors),
|
||||
k: v
|
||||
for k, v in readable_phenomenons_dict(
|
||||
self.coordinator.data.phenomenons_max_colors
|
||||
).items()
|
||||
if k is not None
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user