Fix Plugwise hvac action and mode (#41550)
This commit is contained in:
parent
2074da4f9f
commit
368bc0c34b
6 changed files with 16 additions and 18 deletions
|
@ -114,7 +114,6 @@ class PwThermostat(SmileGateway, ClimateEntity):
|
|||
if self._cooling_state:
|
||||
return CURRENT_HVAC_COOL
|
||||
return CURRENT_HVAC_IDLE
|
||||
if self._heating_state is not None:
|
||||
if self._setpoint > self._temperature:
|
||||
return CURRENT_HVAC_HEAT
|
||||
return CURRENT_HVAC_IDLE
|
||||
|
@ -142,7 +141,6 @@ class PwThermostat(SmileGateway, ClimateEntity):
|
|||
@property
|
||||
def hvac_modes(self):
|
||||
"""Return the available hvac modes list."""
|
||||
if self._heating_state is not None:
|
||||
if self._compressor_state is not None:
|
||||
return HVAC_MODES_HEAT_COOL
|
||||
return HVAC_MODES_HEAT_ONLY
|
||||
|
@ -263,11 +261,11 @@ class PwThermostat(SmileGateway, ClimateEntity):
|
|||
if heater_central_data.get("compressor_state") is not None:
|
||||
self._compressor_state = heater_central_data["compressor_state"]
|
||||
|
||||
if self._schema_status:
|
||||
self._hvac_mode = HVAC_MODE_AUTO
|
||||
elif self._heating_state is not None:
|
||||
self._hvac_mode = HVAC_MODE_HEAT
|
||||
if self._compressor_state is not None:
|
||||
self._hvac_mode = HVAC_MODE_HEAT_COOL
|
||||
|
||||
if self._schema_status:
|
||||
self._hvac_mode = HVAC_MODE_AUTO
|
||||
|
||||
self.async_write_ha_state()
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"domain": "plugwise",
|
||||
"name": "Plugwise",
|
||||
"documentation": "https://www.home-assistant.io/integrations/plugwise",
|
||||
"requirements": ["Plugwise_Smile==1.5.1"],
|
||||
"requirements": ["Plugwise_Smile==1.6.0"],
|
||||
"codeowners": ["@CoMPaTech", "@bouwew"],
|
||||
"zeroconf": ["_plugwise._tcp.local."],
|
||||
"config_flow": true
|
||||
|
|
|
@ -26,7 +26,7 @@ Mastodon.py==1.5.1
|
|||
OPi.GPIO==0.4.0
|
||||
|
||||
# homeassistant.components.plugwise
|
||||
Plugwise_Smile==1.5.1
|
||||
Plugwise_Smile==1.6.0
|
||||
|
||||
# homeassistant.components.essent
|
||||
PyEssent==0.13
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
HAP-python==3.0.0
|
||||
|
||||
# homeassistant.components.plugwise
|
||||
Plugwise_Smile==1.5.1
|
||||
Plugwise_Smile==1.6.0
|
||||
|
||||
# homeassistant.components.flick_electric
|
||||
PyFlick==0.0.2
|
||||
|
|
|
@ -80,7 +80,7 @@ def mock_smile_adam():
|
|||
return_value=True
|
||||
)
|
||||
smile_mock.return_value.single_master_thermostat.side_effect = Mock(
|
||||
return_value=True
|
||||
return_value=False
|
||||
)
|
||||
smile_mock.return_value.set_schedule_state.side_effect = AsyncMock(
|
||||
return_value=True
|
||||
|
|
|
@ -13,7 +13,7 @@ async def test_adam_climate_entity_attributes(hass, mock_smile_adam):
|
|||
state = hass.states.get("climate.zone_lisa_wk")
|
||||
attrs = state.attributes
|
||||
|
||||
assert attrs["hvac_modes"] is None
|
||||
assert attrs["hvac_modes"] == ["heat", "auto"]
|
||||
|
||||
assert "preset_modes" in attrs
|
||||
assert "no_frost" in attrs["preset_modes"]
|
||||
|
@ -29,7 +29,7 @@ async def test_adam_climate_entity_attributes(hass, mock_smile_adam):
|
|||
state = hass.states.get("climate.zone_thermostat_jessie")
|
||||
attrs = state.attributes
|
||||
|
||||
assert attrs["hvac_modes"] is None
|
||||
assert attrs["hvac_modes"] == ["heat", "auto"]
|
||||
|
||||
assert "preset_modes" in attrs
|
||||
assert "no_frost" in attrs["preset_modes"]
|
||||
|
|
Loading…
Add table
Reference in a new issue