Skip to content

Commit

Permalink
Fix error setting up sensor attributes (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
JohNan authored Jan 7, 2022
1 parent ed2040a commit 6020702
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/pollenprognos/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def native_value(self):
def extra_state_attributes(self):
attributes = {day['day_name']: day['level'] for day in self._allergen.get('days', []) if day['day'] != 0}
if hasattr(self, "add_state_attributes"):
attributes = {**attributes, **add_state_attributes}
attributes = {**attributes, **self.add_state_attributes}
return attributes

@property
Expand Down

0 comments on commit 6020702

Please sign in to comment.