Deprecate conf_update_interval (#20924)
* Deprecate update_interval and replace with scan_interval * Update tests * Fix Darksky tests * Fix Darksky tests correctly This reverts commit a73384a223ba8a93c682042d9351cd5a7a399183. * Provide the default for the non deprecated option * Don't override default schema for sensors
This commit is contained in:
1 parent
bc17adda8d
commit
84053103f0
15 files changed
+249
-120
No files matched your search
@@ -21,7 +21,7 @@ VALID_CONFIG_MINIMAL = {
|
||||
'api_key': 'foo',
|
||||
'forecast': [1, 2],
|
||||
'monitored_conditions': ['summary', 'icon', 'temperature_high'],
|
||||
'update_interval': timedelta(seconds=120),
|
||||
'scan_interval': timedelta(seconds=120),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ INVALID_CONFIG_MINIMAL = {
|
||||
'api_key': 'foo',
|
||||
'forecast': [1, 2],
|
||||
'monitored_conditions': ['sumary', 'iocn', 'temperature_high'],
|
||||
'update_interval': timedelta(seconds=120),
|
||||
'scan_interval': timedelta(seconds=120),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ VALID_CONFIG_LANG_DE = {
|
||||
'monitored_conditions': ['summary', 'icon', 'temperature_high',
|
||||
'minutely_summary', 'hourly_summary',
|
||||
'daily_summary', 'humidity', ],
|
||||
'update_interval': timedelta(seconds=120),
|
||||
'scan_interval': timedelta(seconds=120),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ INVALID_CONFIG_LANG = {
|
||||
'forecast': [1, 2],
|
||||
'language': 'yz',
|
||||
'monitored_conditions': ['summary', 'icon', 'temperature_high'],
|
||||
'update_interval': timedelta(seconds=120),
|
||||
'scan_interval': timedelta(seconds=120),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -138,8 +138,11 @@ class TestDarkSkySetup(unittest.TestCase):
|
||||
msg = '400 Client Error: Bad Request for url: {}'.format(url)
|
||||
mock_get_forecast.side_effect = HTTPError(msg,)
|
||||
|
||||
response = darksky.setup_platform(self.hass, VALID_CONFIG_MINIMAL,
|
||||
MagicMock())
|
||||
response = darksky.setup_platform(
|
||||
self.hass,
|
||||
VALID_CONFIG_MINIMAL['sensor'],
|
||||
MagicMock()
|
||||
)
|
||||
assert not response
|
||||
|
||||
@requests_mock.Mocker()
|
||||
|
||||
Reference in new issue
Block a user