mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
[calendar] Fix scan interval (#5205)
This commit is contained in:
parent
aa1e4c564c
commit
81922b88a2
@ -6,6 +6,8 @@ https://home-assistant.io/components/calendar/
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
import logging
|
import logging
|
||||||
|
from datetime import timedelta
|
||||||
|
|
||||||
import re
|
import re
|
||||||
|
|
||||||
from homeassistant.components.google import (CONF_OFFSET,
|
from homeassistant.components.google import (CONF_OFFSET,
|
||||||
@ -20,6 +22,7 @@ from homeassistant.util import dt
|
|||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
SCAN_INTERVAL = timedelta(seconds=60)
|
||||||
DOMAIN = 'calendar'
|
DOMAIN = 'calendar'
|
||||||
ENTITY_ID_FORMAT = DOMAIN + '.{}'
|
ENTITY_ID_FORMAT = DOMAIN + '.{}'
|
||||||
|
|
||||||
@ -27,7 +30,7 @@ ENTITY_ID_FORMAT = DOMAIN + '.{}'
|
|||||||
def setup(hass, config):
|
def setup(hass, config):
|
||||||
"""Track states and offer events for calendars."""
|
"""Track states and offer events for calendars."""
|
||||||
component = EntityComponent(
|
component = EntityComponent(
|
||||||
logging.getLogger(__name__), DOMAIN, hass, 60, DOMAIN)
|
logging.getLogger(__name__), DOMAIN, hass, SCAN_INTERVAL, DOMAIN)
|
||||||
|
|
||||||
component.setup(config)
|
component.setup(config)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user