Removed redundant Throttle decorator (#1862)

pull/1863/head
Christoph Wagner 2016-04-20 09:20:30 +02:00 committed by Paulus Schoutsen
parent 7d4b11f4ec
commit fbfdf5a286
1 changed files with 0 additions and 6 deletions

View File

@ -5,23 +5,18 @@ For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.rest/
"""
import logging
from datetime import timedelta
import requests
from homeassistant.const import CONF_VALUE_TEMPLATE, STATE_UNKNOWN
from homeassistant.helpers.entity import Entity
from homeassistant.helpers import template
from homeassistant.util import Throttle
_LOGGER = logging.getLogger(__name__)
DEFAULT_NAME = 'REST Sensor'
DEFAULT_METHOD = 'GET'
# Return cached results if last scan was less then this time ago
MIN_TIME_BETWEEN_UPDATES = timedelta(seconds=60)
# pylint: disable=unused-variable
def setup_platform(hass, config, add_devices, discovery_info=None):
@ -96,7 +91,6 @@ class RestData(object):
self._verify_ssl = verify_ssl
self.data = None
@Throttle(MIN_TIME_BETWEEN_UPDATES)
def update(self):
"""Get the latest data from REST service with GET method."""
try: