Skip to content
Permalink
Browse files
Bump plugwise to v0.18.4 (#72263)
  • Loading branch information
bouwew committed May 23, 2022
1 parent 800410d commit e17a653cf0a84de374cc215737bfea11ded38fee
Showing 8 changed files with 12 additions and 36 deletions.
@@ -105,6 +105,7 @@ def hvac_action(self) -> HVACAction:
return HVACAction.HEATING
if heater_central_data["binary_sensors"].get("cooling_state"):
return HVACAction.COOLING

return HVACAction.IDLE

@property
@@ -132,9 +133,6 @@ async def async_set_temperature(self, **kwargs: Any) -> None:
@plugwise_command
async def async_set_hvac_mode(self, hvac_mode: HVACMode) -> None:
"""Set the hvac mode."""
if hvac_mode == HVACMode.AUTO and not self.device.get("schedule_temperature"):
raise ValueError("Cannot set HVAC mode to Auto: No schedule available")

await self.coordinator.api.set_schedule_state(
self.device["location"],
self.device.get("last_used"),
@@ -2,7 +2,7 @@
"domain": "plugwise",
"name": "Plugwise",
"documentation": "https://www.home-assistant.io/integrations/plugwise",
"requirements": ["plugwise==0.18.2"],
"requirements": ["plugwise==0.18.4"],
"codeowners": ["@CoMPaTech", "@bouwew", "@brefra", "@frenck"],
"zeroconf": ["_plugwise._tcp.local."],
"config_flow": true,
@@ -1245,7 +1245,7 @@ plexauth==0.0.6
plexwebsocket==0.0.13

# homeassistant.components.plugwise
plugwise==0.18.2
plugwise==0.18.4

# homeassistant.components.plum_lightpad
plumlightpad==0.0.11
@@ -847,7 +847,7 @@ plexauth==0.0.6
plexwebsocket==0.0.13

# homeassistant.components.plugwise
plugwise==0.18.2
plugwise==0.18.4

# homeassistant.components.plum_lightpad
plumlightpad==0.0.11
@@ -34,7 +34,6 @@
],
"selected_schedule": "None",
"last_used": "Badkamer Schema",
"schedule_temperature": 0.0,
"mode": "heat",
"sensors": {
"temperature": 16.5,
@@ -104,7 +103,6 @@
],
"selected_schedule": "GF7 Woonkamer",
"last_used": "GF7 Woonkamer",
"schedule_temperature": 15.0,
"mode": "auto",
"sensors": {
"temperature": 20.9,
@@ -301,7 +299,6 @@
],
"selected_schedule": "CV Jessie",
"last_used": "CV Jessie",
"schedule_temperature": 15.0,
"mode": "auto",
"sensors": {
"temperature": 17.2,
@@ -352,7 +349,6 @@
],
"selected_schedule": "Badkamer Schema",
"last_used": "Badkamer Schema",
"schedule_temperature": 15.0,
"mode": "auto",
"sensors": {
"temperature": 18.9,
@@ -402,7 +398,6 @@
],
"selected_schedule": "None",
"last_used": "Badkamer Schema",
"schedule_temperature": 0.0,
"mode": "heat",
"sensors": {
"temperature": 15.6,
@@ -63,11 +63,10 @@
"resolution": 0.1,
"preset_modes": ["no_frost", "home", "away", "asleep", "vacation"],
"active_preset": "home",
"available_schedules": ["None"],
"selected_schedule": "None",
"last_used": null,
"schedule_temperature": null,
"mode": "heat",
"available_schedules": ["standaard"],
"selected_schedule": "standaard",
"last_used": "standaard",
"mode": "auto",
"sensors": {
"temperature": 19.3,
"setpoint": 21.0,
@@ -150,10 +150,11 @@ async def test_anna_climate_entity_attributes(
"""Test creation of anna climate device environment."""
state = hass.states.get("climate.anna")
assert state
assert state.state == HVACMode.HEAT
assert state.state == HVACMode.AUTO
assert state.attributes["hvac_modes"] == [
HVACMode.HEAT,
HVACMode.COOL,
HVACMode.AUTO,
]
assert "no_frost" in state.attributes["preset_modes"]
assert "home" in state.attributes["preset_modes"]
@@ -199,24 +200,12 @@ async def test_anna_climate_entity_climate_changes(
await hass.services.async_call(
"climate",
"set_hvac_mode",
{"entity_id": "climate.anna", "hvac_mode": "heat_cool"},
{"entity_id": "climate.anna", "hvac_mode": "heat"},
blocking=True,
)

assert mock_smile_anna.set_temperature.call_count == 1
assert mock_smile_anna.set_schedule_state.call_count == 1
mock_smile_anna.set_schedule_state.assert_called_with(
"c784ee9fdab44e1395b8dee7d7a497d5", None, "off"
"c784ee9fdab44e1395b8dee7d7a497d5", "standaard", "off"
)

# Auto mode is not available, no schedules
with pytest.raises(ValueError):
await hass.services.async_call(
"climate",
"set_hvac_mode",
{"entity_id": "climate.anna", "hvac_mode": "auto"},
blocking=True,
)

assert mock_smile_anna.set_temperature.call_count == 1
assert mock_smile_anna.set_schedule_state.call_count == 1
@@ -54,7 +54,6 @@ async def test_diagnostics(
],
"selected_schedule": "None",
"last_used": "Badkamer Schema",
"schedule_temperature": 0.0,
"mode": "heat",
"sensors": {"temperature": 16.5, "setpoint": 13.0, "battery": 67},
},
@@ -120,7 +119,6 @@ async def test_diagnostics(
],
"selected_schedule": "GF7 Woonkamer",
"last_used": "GF7 Woonkamer",
"schedule_temperature": 15.0,
"mode": "auto",
"sensors": {"temperature": 20.9, "setpoint": 21.5, "battery": 34},
},
@@ -290,7 +288,6 @@ async def test_diagnostics(
],
"selected_schedule": "CV Jessie",
"last_used": "CV Jessie",
"schedule_temperature": 15.0,
"mode": "auto",
"sensors": {"temperature": 17.2, "setpoint": 15.0, "battery": 37},
},
@@ -337,7 +334,6 @@ async def test_diagnostics(
],
"selected_schedule": "Badkamer Schema",
"last_used": "Badkamer Schema",
"schedule_temperature": 15.0,
"mode": "auto",
"sensors": {"temperature": 18.9, "setpoint": 14.0, "battery": 92},
},
@@ -380,7 +376,6 @@ async def test_diagnostics(
],
"selected_schedule": "None",
"last_used": "Badkamer Schema",
"schedule_temperature": 0.0,
"mode": "heat",
"sensors": {
"temperature": 15.6,

0 comments on commit e17a653

Please sign in to comment.