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:
Unai 2021-04-13 00:14:29 +02:00 committed by GitHub
parent 88d2fb4aa6
commit ff8e4fb77f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 7 additions and 5 deletions

View file

@ -10,6 +10,7 @@ import voluptuous as vol
from homeassistant.const import CONF_HOST, CONF_PORT, CONF_SCAN_INTERVAL
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.discovery import load_platform
from homeassistant.util.dt import now
_LOGGER = logging.getLogger(__name__)
@ -59,7 +60,7 @@ def setup(hass, config):
scan_interval = gateway[CONF_SCAN_INTERVAL].total_seconds()
try:
cube = MaxCube(host, port)
cube = MaxCube(host, port, now=now)
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))

View file

@ -2,6 +2,6 @@
"domain": "maxcube",
"name": "eQ-3 MAX!",
"documentation": "https://www.home-assistant.io/integrations/maxcube",
"requirements": ["maxcube-api==0.4.1"],
"requirements": ["maxcube-api==0.4.2"],
"codeowners": []
}

View file

@ -918,7 +918,7 @@ magicseaweed==1.0.3
matrix-client==0.3.2
# homeassistant.components.maxcube
maxcube-api==0.4.1
maxcube-api==0.4.2
# homeassistant.components.mythicbeastsdns
mbddns==0.1.2

View file

@ -490,7 +490,7 @@ logi_circle==0.2.2
luftdaten==0.6.4
# homeassistant.components.maxcube
maxcube-api==0.4.1
maxcube-api==0.4.2
# homeassistant.components.mythicbeastsdns
mbddns==0.1.2

View file

@ -10,6 +10,7 @@ import pytest
from homeassistant.components.maxcube import DOMAIN
from homeassistant.setup import async_setup_component
from homeassistant.util.dt import now
@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)
await hass.async_block_till_done()
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