Skip to content

Commit

Permalink
Plugwise: bug-fix for Anna + Techneco Elga combination (home-assistan…
Browse files Browse the repository at this point in the history
  • Loading branch information
bouwew authored Nov 26, 2023
1 parent 2e1c722 commit 959b98b
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 21 deletions.
2 changes: 1 addition & 1 deletion homeassistant/components/plugwise/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
"integration_type": "hub",
"iot_class": "local_polling",
"loggers": ["crcmod", "plugwise"],
"requirements": ["plugwise==0.34.0"],
"requirements": ["plugwise==0.34.3"],
"zeroconf": ["_plugwise._tcp.local."]
}
2 changes: 1 addition & 1 deletion requirements_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1477,7 +1477,7 @@ plexauth==0.0.6
plexwebsocket==0.0.14

# homeassistant.components.plugwise
plugwise==0.34.0
plugwise==0.34.3

# homeassistant.components.plum_lightpad
plumlightpad==0.0.11
Expand Down
2 changes: 1 addition & 1 deletion requirements_test_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1135,7 +1135,7 @@ plexauth==0.0.6
plexwebsocket==0.0.14

# homeassistant.components.plugwise
plugwise==0.34.0
plugwise==0.34.3

# homeassistant.components.plum_lightpad
plumlightpad==0.0.11
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"binary_sensors": {
"compressor_state": true,
"cooling_enabled": false,
"cooling_state": false,
"dhw_state": false,
"flame_state": false,
"heating_state": true,
Expand All @@ -40,7 +41,7 @@
"setpoint": 60.0,
"upper_bound": 100.0
},
"model": "Generic heater",
"model": "Generic heater/cooler",
"name": "OpenTherm",
"sensors": {
"dhw_temperature": 46.3,
Expand Down Expand Up @@ -72,7 +73,8 @@
"cooling_activation_outdoor_temperature": 21.0,
"cooling_deactivation_threshold": 4.0,
"illuminance": 86.0,
"setpoint": 20.5,
"setpoint_high": 30.0,
"setpoint_low": 20.5,
"temperature": 19.3
},
"temperature_offset": {
Expand All @@ -84,16 +86,18 @@
"thermostat": {
"lower_bound": 4.0,
"resolution": 0.1,
"setpoint": 20.5,
"setpoint_high": 30.0,
"setpoint_low": 20.5,
"upper_bound": 30.0
},
"vendor": "Plugwise"
}
},
"gateway": {
"cooling_present": false,
"cooling_present": true,
"gateway_id": "015ae9ea3f964e668e490fa39da3870b",
"heater_id": "1cbf783bb11e4a7c8a6843dee3a86927",
"item_count": 66,
"notifications": {},
"smile_name": "Smile Anna"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"cooling_activation_outdoor_temperature": 21.0,
"cooling_deactivation_threshold": 4.0,
"illuminance": 86.0,
"setpoint_high": 24.0,
"setpoint_high": 30.0,
"setpoint_low": 20.5,
"temperature": 26.3
},
Expand All @@ -86,7 +86,7 @@
"thermostat": {
"lower_bound": 4.0,
"resolution": 0.1,
"setpoint_high": 24.0,
"setpoint_high": 30.0,
"setpoint_low": 20.5,
"upper_bound": 30.0
},
Expand All @@ -97,6 +97,7 @@
"cooling_present": true,
"gateway_id": "015ae9ea3f964e668e490fa39da3870b",
"heater_id": "1cbf783bb11e4a7c8a6843dee3a86927",
"item_count": 66,
"notifications": {},
"smile_name": "Smile Anna"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"cooling_activation_outdoor_temperature": 25.0,
"cooling_deactivation_threshold": 4.0,
"illuminance": 86.0,
"setpoint_high": 24.0,
"setpoint_high": 30.0,
"setpoint_low": 20.5,
"temperature": 23.0
},
Expand All @@ -86,7 +86,7 @@
"thermostat": {
"lower_bound": 4.0,
"resolution": 0.1,
"setpoint_high": 24.0,
"setpoint_high": 30.0,
"setpoint_low": 20.5,
"upper_bound": 30.0
},
Expand All @@ -97,6 +97,7 @@
"cooling_present": true,
"gateway_id": "015ae9ea3f964e668e490fa39da3870b",
"heater_id": "1cbf783bb11e4a7c8a6843dee3a86927",
"item_count": 66,
"notifications": {},
"smile_name": "Smile Anna"
}
Expand Down
21 changes: 11 additions & 10 deletions tests/components/plugwise/test_climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,17 +296,18 @@ async def test_anna_climate_entity_attributes(
assert state
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_COOL]

assert "no_frost" in state.attributes["preset_modes"]
assert "home" in state.attributes["preset_modes"]

assert state.attributes["current_temperature"] == 19.3
assert state.attributes["preset_mode"] == "home"
assert state.attributes["supported_features"] == 17
assert state.attributes["temperature"] == 20.5
assert state.attributes["min_temp"] == 4.0
assert state.attributes["max_temp"] == 30.0
assert state.attributes["supported_features"] == 18
assert state.attributes["target_temp_high"] == 30
assert state.attributes["target_temp_low"] == 20.5
assert state.attributes["min_temp"] == 4
assert state.attributes["max_temp"] == 30
assert state.attributes["target_temp_step"] == 0.1


Expand All @@ -325,7 +326,7 @@ async def test_anna_2_climate_entity_attributes(
HVACMode.HEAT_COOL,
]
assert state.attributes["supported_features"] == 18
assert state.attributes["target_temp_high"] == 24.0
assert state.attributes["target_temp_high"] == 30
assert state.attributes["target_temp_low"] == 20.5


Expand Down Expand Up @@ -354,13 +355,13 @@ async def test_anna_climate_entity_climate_changes(
await hass.services.async_call(
"climate",
"set_temperature",
{"entity_id": "climate.anna", "target_temp_high": 25, "target_temp_low": 20},
{"entity_id": "climate.anna", "target_temp_high": 30, "target_temp_low": 20},
blocking=True,
)
assert mock_smile_anna.set_temperature.call_count == 1
mock_smile_anna.set_temperature.assert_called_with(
"c784ee9fdab44e1395b8dee7d7a497d5",
{"setpoint_high": 25.0, "setpoint_low": 20.0},
{"setpoint_high": 30.0, "setpoint_low": 20.0},
)

await hass.services.async_call(
Expand All @@ -386,7 +387,7 @@ async def test_anna_climate_entity_climate_changes(
await hass.services.async_call(
"climate",
"set_hvac_mode",
{"entity_id": "climate.anna", "hvac_mode": "heat"},
{"entity_id": "climate.anna", "hvac_mode": "heat_cool"},
blocking=True,
)
assert mock_smile_anna.set_schedule_state.call_count == 1
Expand All @@ -400,4 +401,4 @@ async def test_anna_climate_entity_climate_changes(
await hass.async_block_till_done()
state = hass.states.get("climate.anna")
assert state.state == HVACMode.HEAT
assert state.attributes["hvac_modes"] == [HVACMode.HEAT]
assert state.attributes["hvac_modes"] == [HVACMode.HEAT_COOL]

0 comments on commit 959b98b

Please sign in to comment.