Fix for sun issues (#24309)

This commit is contained in:
Penny Wood authored and Paulus Schoutsen committed 2019-06-07 23:28:56 -07:00
1 parent dc93779f02
commit bfafe9ccbe
2 files changed
+24 -7

No files matched your search

+10
View File
@@ -119,6 +119,14 @@ async def test_state_change(hass):
assert sun.STATE_ABOVE_HORIZON == \
hass.states.get(sun.ENTITY_ID).state
with patch('homeassistant.helpers.condition.dt_util.utcnow',
return_value=now):
await hass.config.async_update(longitude=hass.config.longitude+90)
await hass.async_block_till_done()
assert sun.STATE_ABOVE_HORIZON == \
hass.states.get(sun.ENTITY_ID).state
async def test_norway_in_june(hass):
"""Test location in Norway where the sun doesn't set in summer."""
@@ -142,6 +150,8 @@ async def test_norway_in_june(hass):
state.attributes[sun.STATE_ATTR_NEXT_SETTING]) == \
datetime(2016, 7, 26, 22, 19, 1, tzinfo=dt_util.UTC)
assert state.state == sun.STATE_ABOVE_HORIZON
@mark.skip
async def test_state_change_count(hass):