Upgrade maxcube-api to 0.4.2 (#49106)
Upgrade to maxcube-api 0.4.2 to fix pending issues in HA 2021.4.x: - Interpret correctly S command error responses (https://github.com/home-assistant/core/issues/49075) - Support application timezone configuration (https://github.com/home-assistant/core/issues/49076)
This commit is contained in:
parent
88d2fb4aa6
commit
ff8e4fb77f
5 changed files with 7 additions and 5 deletions
|
@ -10,6 +10,7 @@ import voluptuous as vol
|
||||||
from homeassistant.const import CONF_HOST, CONF_PORT, CONF_SCAN_INTERVAL
|
from homeassistant.const import CONF_HOST, CONF_PORT, CONF_SCAN_INTERVAL
|
||||||
import homeassistant.helpers.config_validation as cv
|
import homeassistant.helpers.config_validation as cv
|
||||||
from homeassistant.helpers.discovery import load_platform
|
from homeassistant.helpers.discovery import load_platform
|
||||||
|
from homeassistant.util.dt import now
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
@ -59,7 +60,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(host, port)
|
cube = MaxCube(host, port, now=now)
|
||||||
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))
|
||||||
|
|
|
@ -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.4.1"],
|
"requirements": ["maxcube-api==0.4.2"],
|
||||||
"codeowners": []
|
"codeowners": []
|
||||||
}
|
}
|
||||||
|
|
|
@ -918,7 +918,7 @@ magicseaweed==1.0.3
|
||||||
matrix-client==0.3.2
|
matrix-client==0.3.2
|
||||||
|
|
||||||
# homeassistant.components.maxcube
|
# homeassistant.components.maxcube
|
||||||
maxcube-api==0.4.1
|
maxcube-api==0.4.2
|
||||||
|
|
||||||
# homeassistant.components.mythicbeastsdns
|
# homeassistant.components.mythicbeastsdns
|
||||||
mbddns==0.1.2
|
mbddns==0.1.2
|
||||||
|
|
|
@ -490,7 +490,7 @@ logi_circle==0.2.2
|
||||||
luftdaten==0.6.4
|
luftdaten==0.6.4
|
||||||
|
|
||||||
# homeassistant.components.maxcube
|
# homeassistant.components.maxcube
|
||||||
maxcube-api==0.4.1
|
maxcube-api==0.4.2
|
||||||
|
|
||||||
# homeassistant.components.mythicbeastsdns
|
# homeassistant.components.mythicbeastsdns
|
||||||
mbddns==0.1.2
|
mbddns==0.1.2
|
||||||
|
|
|
@ -10,6 +10,7 @@ import pytest
|
||||||
|
|
||||||
from homeassistant.components.maxcube import DOMAIN
|
from homeassistant.components.maxcube import DOMAIN
|
||||||
from homeassistant.setup import async_setup_component
|
from homeassistant.setup import async_setup_component
|
||||||
|
from homeassistant.util.dt import now
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
@ -105,5 +106,5 @@ async def cube(hass, hass_config, room, thermostat, wallthermostat, windowshutte
|
||||||
assert await async_setup_component(hass, DOMAIN, hass_config)
|
assert await async_setup_component(hass, DOMAIN, hass_config)
|
||||||
await hass.async_block_till_done()
|
await hass.async_block_till_done()
|
||||||
gateway = hass_config[DOMAIN]["gateways"][0]
|
gateway = hass_config[DOMAIN]["gateways"][0]
|
||||||
mock.assert_called_with(gateway["host"], gateway.get("port", 62910))
|
mock.assert_called_with(gateway["host"], gateway.get("port", 62910), now=now)
|
||||||
return cube
|
return cube
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue