mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 04:07:08 +00:00
Migrate to maxcube-api 0.3.0 version (#45126)
Upgrade maxcube-api to solve bugs fixed in last 3 years.
This commit is contained in:
parent
4bca9596ee
commit
ab518a7755
@ -16,7 +16,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
|
||||
name = f"{cube.room_by_id(device.room_id).name} {device.name}"
|
||||
|
||||
# Only add Window Shutters
|
||||
if cube.is_windowshutter(device):
|
||||
if device.is_windowshutter():
|
||||
devices.append(MaxCubeShutter(handler, name, device.rf_address))
|
||||
|
||||
if devices:
|
||||
|
@ -70,7 +70,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
|
||||
for device in cube.devices:
|
||||
name = f"{cube.room_by_id(device.room_id).name} {device.name}"
|
||||
|
||||
if cube.is_thermostat(device) or cube.is_wallthermostat(device):
|
||||
if device.is_thermostat() or device.is_wallthermostat():
|
||||
devices.append(MaxCubeClimate(handler, name, device.rf_address))
|
||||
|
||||
if devices:
|
||||
@ -180,11 +180,11 @@ class MaxCubeClimate(ClimateEntity):
|
||||
device = cube.device_by_rf(self._rf_address)
|
||||
valve = 0
|
||||
|
||||
if cube.is_thermostat(device):
|
||||
if device.is_thermostat():
|
||||
valve = device.valve_position
|
||||
elif cube.is_wallthermostat(device):
|
||||
elif device.is_wallthermostat():
|
||||
for device in cube.devices_by_room(cube.room_by_id(device.room_id)):
|
||||
if cube.is_thermostat(device) and device.valve_position > 0:
|
||||
if device.is_thermostat() and device.valve_position > 0:
|
||||
valve = device.valve_position
|
||||
break
|
||||
else:
|
||||
@ -287,7 +287,7 @@ class MaxCubeClimate(ClimateEntity):
|
||||
cube = self._cubehandle.cube
|
||||
device = cube.device_by_rf(self._rf_address)
|
||||
|
||||
if not cube.is_thermostat(device):
|
||||
if not device.is_thermostat():
|
||||
return {}
|
||||
return {ATTR_VALVE_POSITION: device.valve_position}
|
||||
|
||||
|
@ -2,6 +2,6 @@
|
||||
"domain": "maxcube",
|
||||
"name": "eQ-3 MAX!",
|
||||
"documentation": "https://www.home-assistant.io/integrations/maxcube",
|
||||
"requirements": ["maxcube-api==0.1.0"],
|
||||
"requirements": ["maxcube-api==0.3.0"],
|
||||
"codeowners": []
|
||||
}
|
||||
|
@ -916,7 +916,7 @@ magicseaweed==1.0.3
|
||||
matrix-client==0.3.2
|
||||
|
||||
# homeassistant.components.maxcube
|
||||
maxcube-api==0.1.0
|
||||
maxcube-api==0.3.0
|
||||
|
||||
# homeassistant.components.mythicbeastsdns
|
||||
mbddns==0.1.2
|
||||
|
Loading…
x
Reference in New Issue
Block a user