Upgrade influxdb to 5.0.0 (#12156)

* Upgrade influxdb to 5.0.0

* UPdate sensor as well
This commit is contained in:
Fabian Affolter 2018-02-04 18:23:26 +01:00 committed by GitHub
parent 8fe339d2a8
commit 64cbfdfd77
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 21 additions and 26 deletions

View file

@ -21,7 +21,7 @@ import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.entity_values import EntityValues
from homeassistant.util import utcnow
REQUIREMENTS = ['influxdb==4.1.1']
REQUIREMENTS = ['influxdb==5.0.0']
_LOGGER = logging.getLogger(__name__)
@ -39,6 +39,7 @@ CONF_RETRY_QUEUE = 'retry_queue_limit'
DEFAULT_DATABASE = 'home_assistant'
DEFAULT_VERIFY_SSL = True
DOMAIN = 'influxdb'
TIMEOUT = 5
COMPONENT_CONFIG_SCHEMA_ENTRY = vol.Schema({
@ -137,7 +138,7 @@ def setup(hass, config):
_LOGGER.error("Database host is not accessible due to '%s', please "
"check your entries in the configuration file (host, "
"port, etc.) and verify that the database exists and is "
"READ/WRITE.", exc)
"READ/WRITE", exc)
return False
def influx_event_listener(event):
@ -145,8 +146,7 @@ def setup(hass, config):
state = event.data.get('new_state')
if state is None or state.state in (
STATE_UNKNOWN, '', STATE_UNAVAILABLE) or \
state.entity_id in blacklist_e or \
state.domain in blacklist_d:
state.entity_id in blacklist_e or state.domain in blacklist_d:
return
try:
@ -301,11 +301,9 @@ class RetryOnError(object):
target = utcnow() + self.retry_delay
tracking = {'target': target}
remove = track_point_in_utc_time(self.hass,
partial(scheduled,
retry + 1,
tracking),
target)
remove = track_point_in_utc_time(
self.hass, partial(scheduled, retry + 1, tracking),
target)
tracking['remove'] = remove
tracking["exc"] = ex
wrapper._retry_queue.append(tracking)