1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-26 14:08:21 +00:00

Built-in components no longer use deprecated methods

This commit is contained in:
Paulus Schoutsen
2015-08-03 17:08:13 +02:00
parent 7870e9a5e2
commit 382c1de981
7 changed files with 22 additions and 15 deletions

View File

@@ -5,6 +5,7 @@ homeassistant.components.automation.time
Offers time listening automation rules.
"""
from homeassistant.util import convert
from homeassistant.helpers.event import track_time_change
CONF_HOURS = "time_hours"
CONF_MINUTES = "time_minutes"
@@ -21,8 +22,7 @@ def register(hass, config, action):
""" Listens for time changes and calls action. """
action()
hass.track_time_change(
time_automation_listener,
hour=hours, minute=minutes, second=seconds)
track_time_change(hass, time_automation_listener,
hour=hours, minute=minutes, second=seconds)
return True