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:
Jon Maddox authored and Martin Hjelmare committed 2018-04-21 10:20:33 +02:00
1 parent cb490780c9
commit f12ff6f297
2 files changed
+8 -3

No files matched your search

+2
View File
@@ -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')