Skip to content
This repository has been archived by the owner on Jan 24, 2023. It is now read-only.

Commit

Permalink
Update after deprecation of device_state_attributes.
Browse files Browse the repository at this point in the history
Please see this change: https://github.com/home-assistant/developers.home-assistant/pull/837/files

'device_state_attributes' has  been renamed to 'extra_state_attributes'.

It was still working, but this was adding warnings to my log that I'm happy to address

Testing:

I installed the updated component, noticed all untappd sensors worked as expected, and noticed the warning no longer appears in my HA logs
  • Loading branch information
prestomation authored and swetoast committed Jan 1, 2022
1 parent ecee7bc commit d8d8a29
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions custom_components/untappd/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def icon(self):
return ICON

@property
def device_state_attributes(self):
def extra_state_attributes(self):
return {
ATTR_ABV: self._abv,
ATTR_BEER: self._beer,
Expand Down Expand Up @@ -215,7 +215,7 @@ def icon(self):
return ICON

@property
def device_state_attributes(self):
def extra_state_attributes(self):
return self.hass.data[WISHLIST_DATA]


Expand Down Expand Up @@ -270,7 +270,7 @@ def icon(self):
return ICON

@property
def device_state_attributes(self):
def extra_state_attributes(self):
return {
ATTR_BADGE: self._badge,
ATTR_LEVEL: self._level,
Expand Down

0 comments on commit d8d8a29

Please sign in to comment.