diff --git a/homeassistant/__init__.py b/homeassistant/__init__.py index a51bb6b47a8..96d24cb62cf 100644 --- a/homeassistant/__init__.py +++ b/homeassistant/__init__.py @@ -27,7 +27,7 @@ import homeassistant.util as util DOMAIN = "homeassistant" # How often time_changed event should fire -TIMER_INTERVAL = 3 # seconds +TIMER_INTERVAL = 1 # seconds # How long we wait for the result of a service call SERVICE_CALL_LIMIT = 10 # seconds diff --git a/homeassistant/components/chromecast.py b/homeassistant/components/chromecast.py index 2f619007365..b628a21e97c 100644 --- a/homeassistant/components/chromecast.py +++ b/homeassistant/components/chromecast.py @@ -297,7 +297,7 @@ def setup(hass, config): pychromecast.play_youtube_video(video_id, cast.host) update_chromecast_state(entity_id, cast) - hass.track_time_change(update_chromecast_states, second=[0, 15, 30, 45]) + hass.track_time_change(update_chromecast_states, second=range(0, 60, 15)) hass.services.register(DOMAIN, SERVICE_TURN_OFF, turn_off_service) diff --git a/homeassistant/components/device_tracker/__init__.py b/homeassistant/components/device_tracker/__init__.py index 009cf15ad20..10efdf8c840 100644 --- a/homeassistant/components/device_tracker/__init__.py +++ b/homeassistant/components/device_tracker/__init__.py @@ -127,7 +127,7 @@ class DeviceTracker(object): return hass.track_time_change( - update_device_state, second=[0, 12, 24, 36, 48]) + update_device_state, second=range(0, 60, 12)) hass.services.register(DOMAIN, SERVICE_DEVICE_TRACKER_RELOAD, diff --git a/homeassistant/components/sensor/__init__.py b/homeassistant/components/sensor/__init__.py index 91d4cec9236..daf0945e289 100644 --- a/homeassistant/components/sensor/__init__.py +++ b/homeassistant/components/sensor/__init__.py @@ -83,6 +83,7 @@ def setup(hass, config): discovery.listen(hass, DISCOVERY_PLATFORMS.keys(), sensor_discovered) - hass.track_time_change(update_sensor_states) + # Fire every 3 seconds + hass.track_time_change(update_sensor_states, seconds=range(0, 60, 3)) return True