mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +00:00
* Zestimate fix for issue #23837 removed references to MIN_TIME_BETWEEN_UPDATES and replaced with SCAN_INTERVAL * Zestimate fix for issue #23837 removed references to MIN_TIME_BETWEEN_UPDATES and replaced with SCAN_INTERVAL
This commit is contained in:
parent
ac5ab52d01
commit
3eb6b9d297
@ -10,7 +10,6 @@ from homeassistant.const import (CONF_API_KEY,
|
|||||||
CONF_NAME, ATTR_ATTRIBUTION)
|
CONF_NAME, ATTR_ATTRIBUTION)
|
||||||
import homeassistant.helpers.config_validation as cv
|
import homeassistant.helpers.config_validation as cv
|
||||||
from homeassistant.helpers.entity import Entity
|
from homeassistant.helpers.entity import Entity
|
||||||
from homeassistant.util import Throttle
|
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
_RESOURCE = 'http://www.zillow.com/webservice/GetZestimate.htm'
|
_RESOURCE = 'http://www.zillow.com/webservice/GetZestimate.htm'
|
||||||
@ -39,8 +38,7 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
|
|||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
# Return cached results if last scan was less then this time ago.
|
SCAN_INTERVAL = timedelta(minutes=30)
|
||||||
MIN_TIME_BETWEEN_UPDATES = timedelta(minutes=30)
|
|
||||||
|
|
||||||
|
|
||||||
def setup_platform(hass, config, add_entities, discovery_info=None):
|
def setup_platform(hass, config, add_entities, discovery_info=None):
|
||||||
@ -100,7 +98,6 @@ class ZestimateDataSensor(Entity):
|
|||||||
"""Icon to use in the frontend, if any."""
|
"""Icon to use in the frontend, if any."""
|
||||||
return ICON
|
return ICON
|
||||||
|
|
||||||
@Throttle(MIN_TIME_BETWEEN_UPDATES)
|
|
||||||
def update(self):
|
def update(self):
|
||||||
"""Get the latest data and update the states."""
|
"""Get the latest data and update the states."""
|
||||||
import xmltodict
|
import xmltodict
|
||||||
|
Loading…
x
Reference in New Issue
Block a user