Met.no - only update data if coordinates changed (#48756)

This commit is contained in:
Daniel Hjelseth Høyer
2021-04-07 12:40:00 +02:00
committed by Franck Nijhof
parent bfb8141f55
commit e366961ddb
2 changed files with 15 additions and 5 deletions
+5
View File
@@ -29,6 +29,11 @@ async def test_tracking_home(hass, mock_weather):
assert len(mock_weather.mock_calls) == 8
# Same coordinates again should not trigger any new requests to met.no
await hass.config.async_update(latitude=10, longitude=20)
await hass.async_block_till_done()
assert len(mock_weather.mock_calls) == 8
entry = hass.config_entries.async_entries()[0]
await hass.config_entries.async_remove(entry.entry_id)
await hass.async_block_till_done()