Bump plugwise to v1.6.2 and adapt (#132608)

This commit is contained in:
Bouwe Westerdijk 2024-12-08 23:36:55 +01:00 committed by Franck Nijhof
parent 26012ac922
commit ef89563bad
No known key found for this signature in database
GPG Key ID: D62583BA8AB11CA3
9 changed files with 26 additions and 29 deletions

View File

@ -191,17 +191,8 @@ class PlugwiseClimateEntity(PlugwiseEntity, ClimateEntity):
self._previous_action_mode(self.coordinator) self._previous_action_mode(self.coordinator)
# Adam provides the hvac_action for each thermostat # Adam provides the hvac_action for each thermostat
if self._gateway["smile_name"] == "Adam": if (action := self.device.get("control_state")) is not None:
if (control_state := self.device.get("control_state")) == "cooling": return HVACAction(action)
return HVACAction.COOLING
if control_state == "heating":
return HVACAction.HEATING
if control_state == "preheating":
return HVACAction.PREHEATING
if control_state == "off":
return HVACAction.IDLE
return HVACAction.IDLE
# Anna # Anna
heater: str = self._gateway["heater_id"] heater: str = self._gateway["heater_id"]

View File

@ -7,6 +7,6 @@
"integration_type": "hub", "integration_type": "hub",
"iot_class": "local_polling", "iot_class": "local_polling",
"loggers": ["plugwise"], "loggers": ["plugwise"],
"requirements": ["plugwise==1.6.1"], "requirements": ["plugwise==1.6.2"],
"zeroconf": ["_plugwise._tcp.local."] "zeroconf": ["_plugwise._tcp.local."]
} }

View File

@ -1622,7 +1622,7 @@ plexauth==0.0.6
plexwebsocket==0.0.14 plexwebsocket==0.0.14
# homeassistant.components.plugwise # homeassistant.components.plugwise
plugwise==1.6.1 plugwise==1.6.2
# homeassistant.components.plum_lightpad # homeassistant.components.plum_lightpad
plumlightpad==0.0.11 plumlightpad==0.0.11

View File

@ -1329,7 +1329,7 @@ plexauth==0.0.6
plexwebsocket==0.0.14 plexwebsocket==0.0.14
# homeassistant.components.plugwise # homeassistant.components.plugwise
plugwise==1.6.1 plugwise==1.6.2
# homeassistant.components.plum_lightpad # homeassistant.components.plum_lightpad
plumlightpad==0.0.11 plumlightpad==0.0.11

View File

@ -176,7 +176,7 @@
"off" "off"
], ],
"climate_mode": "auto", "climate_mode": "auto",
"control_state": "off", "control_state": "idle",
"dev_class": "climate", "dev_class": "climate",
"model": "ThermoZone", "model": "ThermoZone",
"name": "Bathroom", "name": "Bathroom",

View File

@ -3,7 +3,7 @@
"06aecb3d00354375924f50c47af36bd2": { "06aecb3d00354375924f50c47af36bd2": {
"active_preset": "no_frost", "active_preset": "no_frost",
"climate_mode": "off", "climate_mode": "off",
"control_state": "off", "control_state": "idle",
"dev_class": "climate", "dev_class": "climate",
"model": "ThermoZone", "model": "ThermoZone",
"name": "Slaapkamer", "name": "Slaapkamer",
@ -26,7 +26,7 @@
"13228dab8ce04617af318a2888b3c548": { "13228dab8ce04617af318a2888b3c548": {
"active_preset": "home", "active_preset": "home",
"climate_mode": "heat", "climate_mode": "heat",
"control_state": "off", "control_state": "idle",
"dev_class": "climate", "dev_class": "climate",
"model": "ThermoZone", "model": "ThermoZone",
"name": "Woonkamer", "name": "Woonkamer",
@ -238,7 +238,7 @@
"d27aede973b54be484f6842d1b2802ad": { "d27aede973b54be484f6842d1b2802ad": {
"active_preset": "home", "active_preset": "home",
"climate_mode": "heat", "climate_mode": "heat",
"control_state": "off", "control_state": "idle",
"dev_class": "climate", "dev_class": "climate",
"model": "ThermoZone", "model": "ThermoZone",
"name": "Kinderkamer", "name": "Kinderkamer",
@ -285,7 +285,7 @@
"d58fec52899f4f1c92e4f8fad6d8c48c": { "d58fec52899f4f1c92e4f8fad6d8c48c": {
"active_preset": "home", "active_preset": "home",
"climate_mode": "heat", "climate_mode": "heat",
"control_state": "off", "control_state": "idle",
"dev_class": "climate", "dev_class": "climate",
"model": "ThermoZone", "model": "ThermoZone",
"name": "Logeerkamer", "name": "Logeerkamer",

View File

@ -32,6 +32,7 @@
"off" "off"
], ],
"climate_mode": "auto", "climate_mode": "auto",
"control_state": "idle",
"dev_class": "climate", "dev_class": "climate",
"model": "ThermoZone", "model": "ThermoZone",
"name": "Badkamer", "name": "Badkamer",
@ -66,6 +67,7 @@
"off" "off"
], ],
"climate_mode": "heat", "climate_mode": "heat",
"control_state": "idle",
"dev_class": "climate", "dev_class": "climate",
"model": "ThermoZone", "model": "ThermoZone",
"name": "Bios", "name": "Bios",
@ -112,6 +114,7 @@
"446ac08dd04d4eff8ac57489757b7314": { "446ac08dd04d4eff8ac57489757b7314": {
"active_preset": "no_frost", "active_preset": "no_frost",
"climate_mode": "heat", "climate_mode": "heat",
"control_state": "idle",
"dev_class": "climate", "dev_class": "climate",
"model": "ThermoZone", "model": "ThermoZone",
"name": "Garage", "name": "Garage",
@ -258,6 +261,7 @@
"off" "off"
], ],
"climate_mode": "auto", "climate_mode": "auto",
"control_state": "idle",
"dev_class": "climate", "dev_class": "climate",
"model": "ThermoZone", "model": "ThermoZone",
"name": "Jessie", "name": "Jessie",
@ -402,6 +406,7 @@
"off" "off"
], ],
"climate_mode": "auto", "climate_mode": "auto",
"control_state": "heating",
"dev_class": "climate", "dev_class": "climate",
"model": "ThermoZone", "model": "ThermoZone",
"name": "Woonkamer", "name": "Woonkamer",
@ -577,7 +582,7 @@
"cooling_present": false, "cooling_present": false,
"gateway_id": "fe799307f1624099878210aa0b9f1475", "gateway_id": "fe799307f1624099878210aa0b9f1475",
"heater_id": "90986d591dcd426cae3ec3e8111ff730", "heater_id": "90986d591dcd426cae3ec3e8111ff730",
"item_count": 364, "item_count": 369,
"notifications": { "notifications": {
"af82e4ccf9c548528166d38e560662a4": { "af82e4ccf9c548528166d38e560662a4": {
"warning": "Node Plug (with MAC address 000D6F000D13CB01, in room 'n.a.') has been unreachable since 23:03 2020-01-18. Please check the connection and restart the device." "warning": "Node Plug (with MAC address 000D6F000D13CB01, in room 'n.a.') has been unreachable since 23:03 2020-01-18. Please check the connection and restart the device."

View File

@ -34,6 +34,7 @@
'off', 'off',
]), ]),
'climate_mode': 'auto', 'climate_mode': 'auto',
'control_state': 'idle',
'dev_class': 'climate', 'dev_class': 'climate',
'model': 'ThermoZone', 'model': 'ThermoZone',
'name': 'Badkamer', 'name': 'Badkamer',
@ -75,6 +76,7 @@
'off', 'off',
]), ]),
'climate_mode': 'heat', 'climate_mode': 'heat',
'control_state': 'idle',
'dev_class': 'climate', 'dev_class': 'climate',
'model': 'ThermoZone', 'model': 'ThermoZone',
'name': 'Bios', 'name': 'Bios',
@ -131,6 +133,7 @@
'446ac08dd04d4eff8ac57489757b7314': dict({ '446ac08dd04d4eff8ac57489757b7314': dict({
'active_preset': 'no_frost', 'active_preset': 'no_frost',
'climate_mode': 'heat', 'climate_mode': 'heat',
'control_state': 'idle',
'dev_class': 'climate', 'dev_class': 'climate',
'model': 'ThermoZone', 'model': 'ThermoZone',
'name': 'Garage', 'name': 'Garage',
@ -286,6 +289,7 @@
'off', 'off',
]), ]),
'climate_mode': 'auto', 'climate_mode': 'auto',
'control_state': 'idle',
'dev_class': 'climate', 'dev_class': 'climate',
'model': 'ThermoZone', 'model': 'ThermoZone',
'name': 'Jessie', 'name': 'Jessie',
@ -440,6 +444,7 @@
'off', 'off',
]), ]),
'climate_mode': 'auto', 'climate_mode': 'auto',
'control_state': 'heating',
'dev_class': 'climate', 'dev_class': 'climate',
'model': 'ThermoZone', 'model': 'ThermoZone',
'name': 'Woonkamer', 'name': 'Woonkamer',
@ -625,7 +630,7 @@
'cooling_present': False, 'cooling_present': False,
'gateway_id': 'fe799307f1624099878210aa0b9f1475', 'gateway_id': 'fe799307f1624099878210aa0b9f1475',
'heater_id': '90986d591dcd426cae3ec3e8111ff730', 'heater_id': '90986d591dcd426cae3ec3e8111ff730',
'item_count': 364, 'item_count': 369,
'notifications': dict({ 'notifications': dict({
'af82e4ccf9c548528166d38e560662a4': dict({ 'af82e4ccf9c548528166d38e560662a4': dict({
'warning': "Node Plug (with MAC address 000D6F000D13CB01, in room 'n.a.') has been unreachable since 23:03 2020-01-18. Please check the connection and restart the device.", 'warning': "Node Plug (with MAC address 000D6F000D13CB01, in room 'n.a.') has been unreachable since 23:03 2020-01-18. Please check the connection and restart the device.",

View File

@ -31,15 +31,13 @@ async def test_adam_climate_entity_attributes(
state = hass.states.get("climate.woonkamer") state = hass.states.get("climate.woonkamer")
assert state assert state
assert state.state == HVACMode.AUTO assert state.state == HVACMode.AUTO
assert state.attributes["hvac_action"] == "heating"
assert state.attributes["hvac_modes"] == [HVACMode.AUTO, HVACMode.HEAT] assert state.attributes["hvac_modes"] == [HVACMode.AUTO, HVACMode.HEAT]
# hvac_action is not asserted as the fixture is not in line with recent firmware functionality
assert "preset_modes" in state.attributes assert "preset_modes" in state.attributes
assert "no_frost" in state.attributes["preset_modes"] assert "no_frost" in state.attributes["preset_modes"]
assert "home" in state.attributes["preset_modes"] assert "home" in state.attributes["preset_modes"]
assert state.attributes["current_temperature"] == 20.9
assert state.attributes["preset_mode"] == "home" assert state.attributes["preset_mode"] == "home"
assert state.attributes["current_temperature"] == 20.9
assert state.attributes["supported_features"] == 17 assert state.attributes["supported_features"] == 17
assert state.attributes["temperature"] == 21.5 assert state.attributes["temperature"] == 21.5
assert state.attributes["min_temp"] == 0.0 assert state.attributes["min_temp"] == 0.0
@ -49,15 +47,13 @@ async def test_adam_climate_entity_attributes(
state = hass.states.get("climate.jessie") state = hass.states.get("climate.jessie")
assert state assert state
assert state.state == HVACMode.AUTO assert state.state == HVACMode.AUTO
assert state.attributes["hvac_action"] == "idle"
assert state.attributes["hvac_modes"] == [HVACMode.AUTO, HVACMode.HEAT] assert state.attributes["hvac_modes"] == [HVACMode.AUTO, HVACMode.HEAT]
# hvac_action is not asserted as the fixture is not in line with recent firmware functionality
assert "preset_modes" in state.attributes assert "preset_modes" in state.attributes
assert "no_frost" in state.attributes["preset_modes"] assert "no_frost" in state.attributes["preset_modes"]
assert "home" in state.attributes["preset_modes"] assert "home" in state.attributes["preset_modes"]
assert state.attributes["current_temperature"] == 17.2
assert state.attributes["preset_mode"] == "asleep" assert state.attributes["preset_mode"] == "asleep"
assert state.attributes["current_temperature"] == 17.2
assert state.attributes["temperature"] == 15.0 assert state.attributes["temperature"] == 15.0
assert state.attributes["min_temp"] == 0.0 assert state.attributes["min_temp"] == 0.0
assert state.attributes["max_temp"] == 35.0 assert state.attributes["max_temp"] == 35.0