Moved time constant into sensor file

This commit is contained in:
Keilin
2018-10-23 08:49:34 -04:00
parent d2b2955659
commit 6ddb7901b4
2 changed files with 3 additions and 4 deletions

View File

@@ -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

View File

@@ -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."""