mirror of
https://github.com/home-assistant/core.git
synced 2025-07-15 17:27:10 +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
|
from threading import Lock
|
||||||
import time
|
import time
|
||||||
|
|
||||||
from maxcube.connection import MaxCubeConnection
|
|
||||||
from maxcube.cube import MaxCube
|
from maxcube.cube import MaxCube
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
@ -60,7 +59,7 @@ def setup(hass, config):
|
|||||||
scan_interval = gateway[CONF_SCAN_INTERVAL].total_seconds()
|
scan_interval = gateway[CONF_SCAN_INTERVAL].total_seconds()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
cube = MaxCube(MaxCubeConnection(host, port))
|
cube = MaxCube(host, port)
|
||||||
hass.data[DATA_KEY][host] = MaxCubeHandle(cube, scan_interval)
|
hass.data[DATA_KEY][host] = MaxCubeHandle(cube, scan_interval)
|
||||||
except timeout as ex:
|
except timeout as ex:
|
||||||
_LOGGER.error("Unable to connect to Max!Cube gateway: %s", str(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):
|
def __init__(self, cube, scan_interval):
|
||||||
"""Initialize the Cube Handle."""
|
"""Initialize the Cube Handle."""
|
||||||
self.cube = cube
|
self.cube = cube
|
||||||
|
self.cube.use_persistent_connection = scan_interval <= 300 # seconds
|
||||||
self.scan_interval = scan_interval
|
self.scan_interval = scan_interval
|
||||||
self.mutex = Lock()
|
self.mutex = Lock()
|
||||||
self._updatets = time.monotonic()
|
self._updatets = time.monotonic()
|
||||||
|
@ -2,6 +2,6 @@
|
|||||||
"domain": "maxcube",
|
"domain": "maxcube",
|
||||||
"name": "eQ-3 MAX!",
|
"name": "eQ-3 MAX!",
|
||||||
"documentation": "https://www.home-assistant.io/integrations/maxcube",
|
"documentation": "https://www.home-assistant.io/integrations/maxcube",
|
||||||
"requirements": ["maxcube-api==0.3.0"],
|
"requirements": ["maxcube-api==0.4.1"],
|
||||||
"codeowners": []
|
"codeowners": []
|
||||||
}
|
}
|
||||||
|
@ -910,7 +910,7 @@ magicseaweed==1.0.3
|
|||||||
matrix-client==0.3.2
|
matrix-client==0.3.2
|
||||||
|
|
||||||
# homeassistant.components.maxcube
|
# homeassistant.components.maxcube
|
||||||
maxcube-api==0.3.0
|
maxcube-api==0.4.1
|
||||||
|
|
||||||
# homeassistant.components.mythicbeastsdns
|
# homeassistant.components.mythicbeastsdns
|
||||||
mbddns==0.1.2
|
mbddns==0.1.2
|
||||||
|
Loading…
x
Reference in New Issue
Block a user