mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 01:37:08 +00:00
disable throttling for now
This commit is contained in:
parent
956a6418cc
commit
3b8c5d6833
@ -20,7 +20,6 @@ history:
|
|||||||
import logging
|
import logging
|
||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
from homeassistant.helpers.entity import Entity
|
from homeassistant.helpers.entity import Entity
|
||||||
from homeassistant.util import Throttle
|
|
||||||
from homeassistant.const import (STATE_UNKNOWN, CONF_ACCESS_TOKEN, CONF_NAME)
|
from homeassistant.const import (STATE_UNKNOWN, CONF_ACCESS_TOKEN, CONF_NAME)
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
@ -28,8 +27,6 @@ _LOGGER = logging.getLogger(__name__)
|
|||||||
REQUIREMENTS = ['eliqonline==1.0.11']
|
REQUIREMENTS = ['eliqonline==1.0.11']
|
||||||
DEFAULT_NAME = "ELIQ Energy Usage"
|
DEFAULT_NAME = "ELIQ Energy Usage"
|
||||||
|
|
||||||
MIN_TIME_BETWEEN_UPDATES = timedelta(seconds=30)
|
|
||||||
|
|
||||||
|
|
||||||
def setup_platform(hass, config, add_devices, discovery_info=None):
|
def setup_platform(hass, config, add_devices, discovery_info=None):
|
||||||
""" Set up the sensors """
|
""" Set up the sensors """
|
||||||
@ -78,7 +75,6 @@ class EliqSensor(Entity):
|
|||||||
""" Returns the state of the device. """
|
""" Returns the state of the device. """
|
||||||
return self._state
|
return self._state
|
||||||
|
|
||||||
@Throttle(MIN_TIME_BETWEEN_UPDATES)
|
|
||||||
def update(self):
|
def update(self):
|
||||||
""" Gets the latest data """
|
""" Gets the latest data """
|
||||||
response = self.api.get_data_now(channelid=self.channel_id)
|
response = self.api.get_data_now(channelid=self.channel_id)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user