mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 16:57:53 +00:00
Upgrade to maxcube-api-0.4.1 (#47910)
This new version implements a workaround for a hardware bug that causes a factory reset of the full MAX! service. See https://github.com/hackercowboy/python-maxcube-api/issues/12 for more details.
This commit is contained in:
parent
be2be4e867
commit
e91be3f9f5
@ -4,7 +4,6 @@ from socket import timeout
|
||||
from threading import Lock
|
||||
import time
|
||||
|
||||
from maxcube.connection import MaxCubeConnection
|
||||
from maxcube.cube import MaxCube
|
||||
import voluptuous as vol
|
||||
|
||||
@ -60,7 +59,7 @@ def setup(hass, config):
|
||||
scan_interval = gateway[CONF_SCAN_INTERVAL].total_seconds()
|
||||
|
||||
try:
|
||||
cube = MaxCube(MaxCubeConnection(host, port))
|
||||
cube = MaxCube(host, port)
|
||||
hass.data[DATA_KEY][host] = MaxCubeHandle(cube, scan_interval)
|
||||
except timeout as ex:
|
||||
_LOGGER.error("Unable to connect to Max!Cube gateway: %s", str(ex))
|
||||
@ -86,6 +85,7 @@ class MaxCubeHandle:
|
||||
def __init__(self, cube, scan_interval):
|
||||
"""Initialize the Cube Handle."""
|
||||
self.cube = cube
|
||||
self.cube.use_persistent_connection = scan_interval <= 300 # seconds
|
||||
self.scan_interval = scan_interval
|
||||
self.mutex = Lock()
|
||||
self._updatets = time.monotonic()
|
||||
|
@ -2,6 +2,6 @@
|
||||
"domain": "maxcube",
|
||||
"name": "eQ-3 MAX!",
|
||||
"documentation": "https://www.home-assistant.io/integrations/maxcube",
|
||||
"requirements": ["maxcube-api==0.3.0"],
|
||||
"requirements": ["maxcube-api==0.4.1"],
|
||||
"codeowners": []
|
||||
}
|
||||
|
@ -910,7 +910,7 @@ magicseaweed==1.0.3
|
||||
matrix-client==0.3.2
|
||||
|
||||
# homeassistant.components.maxcube
|
||||
maxcube-api==0.3.0
|
||||
maxcube-api==0.4.1
|
||||
|
||||
# homeassistant.components.mythicbeastsdns
|
||||
mbddns==0.1.2
|
||||
|
Loading…
x
Reference in New Issue
Block a user