Upgrade influxdb to 5.0.0 (#12156)
* Upgrade influxdb to 5.0.0 * UPdate sensor as well
This commit is contained in:
parent
8fe339d2a8
commit
64cbfdfd77
4 changed files with 21 additions and 26 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue