Bump plugwise to v0.18.4 (#72263)

This commit is contained in:
Bouwe Westerdijk 2022-05-23 10:59:10 +02:00 committed by GitHub
parent 800410ddf0
commit e17a653cf0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 12 additions and 36 deletions

View file

@ -105,6 +105,7 @@ class PlugwiseClimateEntity(PlugwiseEntity, ClimateEntity):
return HVACAction.HEATING
if heater_central_data["binary_sensors"].get("cooling_state"):
return HVACAction.COOLING
return HVACAction.IDLE
@property
@ -132,9 +133,6 @@ class PlugwiseClimateEntity(PlugwiseEntity, ClimateEntity):
@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"),

View file

@ -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,

View file

@ -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

View file

@ -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

View file

@ -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,

View file

@ -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,

View file

@ -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

View file

@ -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,