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

Commit d8d8a29

Browse files
prestomationswetoast
authored andcommitted
Update after deprecation of device_state_attributes.
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
1 parent ecee7bc commit d8d8a29

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

custom_components/untappd/sensor.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ def icon(self):
142142
return ICON
143143

144144
@property
145-
def device_state_attributes(self):
145+
def extra_state_attributes(self):
146146
return {
147147
ATTR_ABV: self._abv,
148148
ATTR_BEER: self._beer,
@@ -215,7 +215,7 @@ def icon(self):
215215
return ICON
216216

217217
@property
218-
def device_state_attributes(self):
218+
def extra_state_attributes(self):
219219
return self.hass.data[WISHLIST_DATA]
220220

221221

@@ -270,7 +270,7 @@ def icon(self):
270270
return ICON
271271

272272
@property
273-
def device_state_attributes(self):
273+
def extra_state_attributes(self):
274274
return {
275275
ATTR_BADGE: self._badge,
276276
ATTR_LEVEL: self._level,

0 commit comments

Comments
 (0)