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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user