76f63ee262c3a4c55d86f3b9397fb5199792655d,tests/common.py,,ensure_sun_set,#Any#,72
Before Change
def ensure_sun_set(hass):
Trigger sun to set if above horizon.
if sun.is_on(hass):
hass.bus.fire(
EVENT_TIME_CHANGED,
{"now":
sun.next_setting_utc(hass) + timedelta(seconds=10)})
def mock_state_change_event(hass, new_state, old_state=None):
event_data = {
"entity_id": new_state.entity_id,
"new_state": new_state,
After Change
def ensure_sun_set(hass):
Trigger sun to set if above horizon.
if not sun.is_on(hass):
return
fire_time_changed(hass, sun.next_setting_utc(hass) + timedelta(seconds=10))
def mock_state_change_event(hass, new_state, old_state=None):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances Project Name: home-assistant/home-assistant
Commit Name: 76f63ee262c3a4c55d86f3b9397fb5199792655d
Time: 2015-08-03
Author: paulus@paulusschoutsen.nl
File Name: tests/common.py
Class Name:
Method Name: ensure_sun_set
Project Name: home-assistant/home-assistant
Commit Name: 76f63ee262c3a4c55d86f3b9397fb5199792655d
Time: 2015-08-03
Author: paulus@paulusschoutsen.nl
File Name: tests/common.py
Class Name:
Method Name: ensure_sun_risen
Project Name: home-assistant/home-assistant
Commit Name: 2863c2d593184ba4edfda242892b50b466cedcf6
Time: 2015-03-21
Author: paulus@paulusschoutsen.nl
File Name: homeassistant/bootstrap.py
Class Name:
Method Name: setup_component