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
@@ -162,6 +162,8 @@ class TestWeather(unittest.TestCase):
|
||||
state = self.hass.states.get('sensor.yweather_condition')
|
||||
assert state is not None
|
||||
self.assertEqual(state.state, 'Mostly Cloudy')
|
||||
self.assertEqual(state.attributes.get('condition_code'),
|
||||
'28')
|
||||
self.assertEqual(state.attributes.get('friendly_name'),
|
||||
'Yweather Condition')
|
||||
|
||||
|
||||
Reference in new issue
Block a user