Expose the condition code on condition sensors (#14011)
* expose the condition code on condition sensors
* 💄
* like thisss duh
* add test for condition_code
* It’s a string
This commit is contained in:
1 parent
cb490780c9
commit
f12ff6f297
2 files changed
+8
-3
No files matched your search
@@ -131,9 +131,12 @@ class YahooWeatherSensor(Entity):
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
"""Return the state attributes."""
|
||||
return {
|
||||
ATTR_ATTRIBUTION: CONF_ATTRIBUTION,
|
||||
}
|
||||
attrs = {ATTR_ATTRIBUTION: CONF_ATTRIBUTION}
|
||||
|
||||
if self._code is not None and "weather" in self._type:
|
||||
attrs['condition_code'] = self._code
|
||||
|
||||
return attrs
|
||||
|
||||
def update(self):
|
||||
"""Get the latest data from Yahoo! and updates the states."""
|
||||
|
||||
Reference in new issue
Block a user