Skip to content

Commit

Permalink
Merge pull request #302 from bruxy70/development
Browse files Browse the repository at this point in the history
2021.12 compatibility update
  • Loading branch information
bruxy70 authored Dec 7, 2021
2 parents 091fee9 + 1f9ba30 commit bd509b8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion custom_components/garbage_collection/calendar.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ async def async_get_events(self, hass, start_date, end_date):
)

@property
def device_state_attributes(self):
def extra_state_attributes(self):
"""Return the device state attributes."""
if self.hass.data[DOMAIN][CALENDAR_PLATFORM].event is None:
# No tasks, we don't need to show anything.
Expand Down
4 changes: 2 additions & 2 deletions custom_components/garbage_collection/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ async def async_load_holidays(self, today: date) -> None:
and type(self._holiday_observed) is bool
and not self._holiday_observed
):
kwargs["observed"] = False # type: ignore
kwargs["observed"] = self._holiday_observed # type: ignore
hol = holidays.CountryHoliday(self._country_holidays, **kwargs)
if self._holiday_pop_named is not None:
for pop in self._holiday_pop_named:
Expand Down Expand Up @@ -324,7 +324,7 @@ def icon(self):
return self._icon

@property
def device_state_attributes(self):
def extra_state_attributes(self):
"""Return the state attributes."""
res = {}
if self._next_date is None:
Expand Down

0 comments on commit bd509b8

Please sign in to comment.