Add hourly forecasts to Dark Sky (#21820)

This commit is contained in:
Ryan Claussen authored and Diogo Gomes committed 2019-03-27 20:11:25 +00:00
1 parent 29ad3961e5
commit c3f090af17
2 files changed
+32 -8

No files matched your search

+5 -1
View File
@@ -20,6 +20,7 @@ VALID_CONFIG_MINIMAL = {
'platform': 'darksky',
'api_key': 'foo',
'forecast': [1, 2],
'hourly_forecast': [1, 2],
'monitored_conditions': ['summary', 'icon', 'temperature_high'],
'scan_interval': timedelta(seconds=120),
}
@@ -30,6 +31,7 @@ INVALID_CONFIG_MINIMAL = {
'platform': 'darksky',
'api_key': 'foo',
'forecast': [1, 2],
'hourly_forecast': [1, 2],
'monitored_conditions': ['sumary', 'iocn', 'temperature_high'],
'scan_interval': timedelta(seconds=120),
}
@@ -40,6 +42,7 @@ VALID_CONFIG_LANG_DE = {
'platform': 'darksky',
'api_key': 'foo',
'forecast': [1, 2],
'hourly_forecast': [1, 2],
'units': 'us',
'language': 'de',
'monitored_conditions': ['summary', 'icon', 'temperature_high',
@@ -54,6 +57,7 @@ INVALID_CONFIG_LANG = {
'platform': 'darksky',
'api_key': 'foo',
'forecast': [1, 2],
'hourly_forecast': [1, 2],
'language': 'yz',
'monitored_conditions': ['summary', 'icon', 'temperature_high'],
'scan_interval': timedelta(seconds=120),
@@ -157,7 +161,7 @@ class TestDarkSkySetup(unittest.TestCase):
assert mock_get_forecast.called
assert mock_get_forecast.call_count == 1
assert len(self.hass.states.entity_ids()) == 8
assert len(self.hass.states.entity_ids()) == 12
state = self.hass.states.get('sensor.dark_sky_summary')
assert state is not None