mirror of
https://github.com/home-assistant/core.git
synced 2025-08-13 17:45:19 +02:00
Moved time constant into sensor file
This commit is contained in:
@@ -5,7 +5,6 @@ For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/sensor.sense/
|
||||
"""
|
||||
import logging
|
||||
from datetime import timedelta
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.const import (CONF_EMAIL, CONF_PASSWORD, CONF_TIMEOUT)
|
||||
@@ -28,7 +27,6 @@ CONFIG_SCHEMA = vol.Schema({
|
||||
}, extra=vol.ALLOW_EXTRA)
|
||||
|
||||
ACTIVE_UPDATE_RATE = 30
|
||||
MIN_TIME_BETWEEN_DAILY_UPDATES = timedelta(seconds=300)
|
||||
DEFAULT_TIMEOUT = 5
|
||||
|
||||
|
||||
|
@@ -14,8 +14,7 @@ from homeassistant.const import CONF_MONITORED_CONDITIONS
|
||||
from homeassistant.helpers.entity import Entity
|
||||
from homeassistant.util import Throttle
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.components.sense import (SENSE_DATA,
|
||||
MIN_TIME_BETWEEN_DAILY_UPDATES)
|
||||
from homeassistant.components.sense import SENSE_DATA
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
@@ -57,6 +56,8 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
|
||||
vol.All(cv.ensure_list, vol.Length(min=1), [vol.In(VALID_SENSORS)]),
|
||||
})
|
||||
|
||||
MIN_TIME_BETWEEN_DAILY_UPDATES = timedelta(seconds=300)
|
||||
|
||||
|
||||
def setup_platform(hass, config, add_entities, discovery_info=None):
|
||||
"""Set up the Sense sensor."""
|
||||
|
Reference in New Issue
Block a user