mirror of
https://github.com/home-assistant/core.git
synced 2025-07-14 08:47:10 +00:00
Plugwise bump module version to fix heating-state and OnOff devices (#66936)
This commit is contained in:
parent
8c96f1457d
commit
620b653d76
@ -107,15 +107,16 @@ class PlugwiseClimateEntity(PlugwiseEntity, ClimateEntity):
|
|||||||
if "control_state" in self.device:
|
if "control_state" in self.device:
|
||||||
if self.device.get("control_state") == "cooling":
|
if self.device.get("control_state") == "cooling":
|
||||||
return CURRENT_HVAC_COOL
|
return CURRENT_HVAC_COOL
|
||||||
if self.device.get("control_state") == "heating":
|
# Support preheating state as heating, until preheating is added as a separate state
|
||||||
|
if self.device.get("control_state") in ["heating", "preheating"]:
|
||||||
return CURRENT_HVAC_HEAT
|
return CURRENT_HVAC_HEAT
|
||||||
else:
|
else:
|
||||||
heater_central_data = self.coordinator.data.devices[
|
heater_central_data = self.coordinator.data.devices[
|
||||||
self.coordinator.data.gateway["heater_id"]
|
self.coordinator.data.gateway["heater_id"]
|
||||||
]
|
]
|
||||||
if heater_central_data.get("heating_state"):
|
if heater_central_data["binary_sensors"].get("heating_state"):
|
||||||
return CURRENT_HVAC_HEAT
|
return CURRENT_HVAC_HEAT
|
||||||
if heater_central_data.get("cooling_state"):
|
if heater_central_data["binary_sensors"].get("cooling_state"):
|
||||||
return CURRENT_HVAC_COOL
|
return CURRENT_HVAC_COOL
|
||||||
return CURRENT_HVAC_IDLE
|
return CURRENT_HVAC_IDLE
|
||||||
|
|
||||||
|
@ -25,7 +25,6 @@ PLATFORMS_GATEWAY = [
|
|||||||
Platform.SENSOR,
|
Platform.SENSOR,
|
||||||
Platform.SWITCH,
|
Platform.SWITCH,
|
||||||
]
|
]
|
||||||
SENSOR_PLATFORMS = [Platform.SENSOR, Platform.SWITCH]
|
|
||||||
ZEROCONF_MAP = {
|
ZEROCONF_MAP = {
|
||||||
"smile": "P1",
|
"smile": "P1",
|
||||||
"smile_thermo": "Anna",
|
"smile_thermo": "Anna",
|
||||||
|
@ -16,14 +16,7 @@ from homeassistant.helpers import device_registry as dr
|
|||||||
from homeassistant.helpers.aiohttp_client import async_get_clientsession
|
from homeassistant.helpers.aiohttp_client import async_get_clientsession
|
||||||
from homeassistant.helpers.entity_registry import RegistryEntry, async_migrate_entries
|
from homeassistant.helpers.entity_registry import RegistryEntry, async_migrate_entries
|
||||||
|
|
||||||
from .const import (
|
from .const import DEFAULT_PORT, DEFAULT_USERNAME, DOMAIN, LOGGER, PLATFORMS_GATEWAY
|
||||||
DEFAULT_PORT,
|
|
||||||
DEFAULT_USERNAME,
|
|
||||||
DOMAIN,
|
|
||||||
LOGGER,
|
|
||||||
PLATFORMS_GATEWAY,
|
|
||||||
SENSOR_PLATFORMS,
|
|
||||||
)
|
|
||||||
from .coordinator import PlugwiseDataUpdateCoordinator
|
from .coordinator import PlugwiseDataUpdateCoordinator
|
||||||
|
|
||||||
|
|
||||||
@ -77,11 +70,7 @@ async def async_setup_entry_gw(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||||||
sw_version=api.smile_version[0],
|
sw_version=api.smile_version[0],
|
||||||
)
|
)
|
||||||
|
|
||||||
platforms = PLATFORMS_GATEWAY
|
hass.config_entries.async_setup_platforms(entry, PLATFORMS_GATEWAY)
|
||||||
if coordinator.data.gateway["single_master_thermostat"] is None:
|
|
||||||
platforms = SENSOR_PLATFORMS
|
|
||||||
|
|
||||||
hass.config_entries.async_setup_platforms(entry, platforms)
|
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
"domain": "plugwise",
|
"domain": "plugwise",
|
||||||
"name": "Plugwise",
|
"name": "Plugwise",
|
||||||
"documentation": "https://www.home-assistant.io/integrations/plugwise",
|
"documentation": "https://www.home-assistant.io/integrations/plugwise",
|
||||||
"requirements": ["plugwise==0.16.5"],
|
"requirements": ["plugwise==0.16.6"],
|
||||||
"codeowners": ["@CoMPaTech", "@bouwew", "@brefra", "@frenck"],
|
"codeowners": ["@CoMPaTech", "@bouwew", "@brefra", "@frenck"],
|
||||||
"zeroconf": ["_plugwise._tcp.local."],
|
"zeroconf": ["_plugwise._tcp.local."],
|
||||||
"config_flow": true,
|
"config_flow": true,
|
||||||
|
@ -1267,7 +1267,7 @@ plexauth==0.0.6
|
|||||||
plexwebsocket==0.0.13
|
plexwebsocket==0.0.13
|
||||||
|
|
||||||
# homeassistant.components.plugwise
|
# homeassistant.components.plugwise
|
||||||
plugwise==0.16.5
|
plugwise==0.16.6
|
||||||
|
|
||||||
# homeassistant.components.plum_lightpad
|
# homeassistant.components.plum_lightpad
|
||||||
plumlightpad==0.0.11
|
plumlightpad==0.0.11
|
||||||
|
@ -795,7 +795,7 @@ plexauth==0.0.6
|
|||||||
plexwebsocket==0.0.13
|
plexwebsocket==0.0.13
|
||||||
|
|
||||||
# homeassistant.components.plugwise
|
# homeassistant.components.plugwise
|
||||||
plugwise==0.16.5
|
plugwise==0.16.6
|
||||||
|
|
||||||
# homeassistant.components.plum_lightpad
|
# homeassistant.components.plum_lightpad
|
||||||
plumlightpad==0.0.11
|
plumlightpad==0.0.11
|
||||||
|
@ -1,11 +1,9 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"active_device": true,
|
"smile_name": "Adam",
|
||||||
"cooling_present": false,
|
|
||||||
"gateway_id": "fe799307f1624099878210aa0b9f1475",
|
"gateway_id": "fe799307f1624099878210aa0b9f1475",
|
||||||
"heater_id": "90986d591dcd426cae3ec3e8111ff730",
|
"heater_id": "90986d591dcd426cae3ec3e8111ff730",
|
||||||
"single_master_thermostat": false,
|
"cooling_present": false,
|
||||||
"smile_name": "Adam",
|
|
||||||
"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."
|
||||||
@ -260,8 +258,9 @@
|
|||||||
"lower_bound": 10,
|
"lower_bound": 10,
|
||||||
"upper_bound": 90,
|
"upper_bound": 90,
|
||||||
"resolution": 1,
|
"resolution": 1,
|
||||||
"cooling_active": false,
|
"binary_sensors": {
|
||||||
"heating_state": true,
|
"heating_state": true
|
||||||
|
},
|
||||||
"sensors": {
|
"sensors": {
|
||||||
"water_temperature": 70.0,
|
"water_temperature": 70.0,
|
||||||
"intended_boiler_temperature": 70.0,
|
"intended_boiler_temperature": 70.0,
|
||||||
|
@ -1,11 +1,9 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"active_device": true,
|
"smile_name": "Anna",
|
||||||
"cooling_present": true,
|
|
||||||
"gateway_id": "015ae9ea3f964e668e490fa39da3870b",
|
"gateway_id": "015ae9ea3f964e668e490fa39da3870b",
|
||||||
"heater_id": "1cbf783bb11e4a7c8a6843dee3a86927",
|
"heater_id": "1cbf783bb11e4a7c8a6843dee3a86927",
|
||||||
"single_master_thermostat": true,
|
"cooling_present": true,
|
||||||
"smile_name": "Anna",
|
|
||||||
"notifications": {}
|
"notifications": {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -21,12 +19,11 @@
|
|||||||
"lower_bound": -10,
|
"lower_bound": -10,
|
||||||
"upper_bound": 40,
|
"upper_bound": 40,
|
||||||
"resolution": 1,
|
"resolution": 1,
|
||||||
"heating_state": true,
|
|
||||||
"compressor_state": true,
|
"compressor_state": true,
|
||||||
"cooling_state": false,
|
|
||||||
"cooling_active": false,
|
|
||||||
"binary_sensors": {
|
"binary_sensors": {
|
||||||
"dhw_state": false,
|
"dhw_state": false,
|
||||||
|
"heating_state": true,
|
||||||
|
"cooling_state": false,
|
||||||
"slave_boiler_state": false,
|
"slave_boiler_state": false,
|
||||||
"flame_state": false
|
"flame_state": false
|
||||||
},
|
},
|
||||||
@ -40,7 +37,8 @@
|
|||||||
},
|
},
|
||||||
"switches": {
|
"switches": {
|
||||||
"dhw_cm_switch": false
|
"dhw_cm_switch": false
|
||||||
}
|
},
|
||||||
|
"cooling_active": false
|
||||||
},
|
},
|
||||||
"015ae9ea3f964e668e490fa39da3870b": {
|
"015ae9ea3f964e668e490fa39da3870b": {
|
||||||
"class": "gateway",
|
"class": "gateway",
|
||||||
|
@ -1,11 +1,7 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"active_device": false,
|
|
||||||
"cooling_present": false,
|
|
||||||
"gateway_id": "e950c7d5e1ee407a858e2a8b5016c8b3",
|
|
||||||
"heater_id": null,
|
|
||||||
"single_master_thermostat": false,
|
|
||||||
"smile_name": "P1",
|
"smile_name": "P1",
|
||||||
|
"gateway_id": "e950c7d5e1ee407a858e2a8b5016c8b3",
|
||||||
"notifications": {}
|
"notifications": {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -1,11 +1,7 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"active_device": false,
|
|
||||||
"cooling_present": false,
|
|
||||||
"gateway_id": "0000aaaa0000aaaa0000aaaa0000aa00",
|
|
||||||
"heater_id": null,
|
|
||||||
"single_master_thermostat": false,
|
|
||||||
"smile_name": "Stretch",
|
"smile_name": "Stretch",
|
||||||
|
"gateway_id": "0000aaaa0000aaaa0000aaaa0000aa00",
|
||||||
"notifications": {}
|
"notifications": {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -20,12 +20,10 @@ async def test_diagnostics(
|
|||||||
hass, hass_client, init_integration
|
hass, hass_client, init_integration
|
||||||
) == {
|
) == {
|
||||||
"gateway": {
|
"gateway": {
|
||||||
"active_device": True,
|
"smile_name": "Adam",
|
||||||
"cooling_present": False,
|
|
||||||
"gateway_id": "fe799307f1624099878210aa0b9f1475",
|
"gateway_id": "fe799307f1624099878210aa0b9f1475",
|
||||||
"heater_id": "90986d591dcd426cae3ec3e8111ff730",
|
"heater_id": "90986d591dcd426cae3ec3e8111ff730",
|
||||||
"single_master_thermostat": False,
|
"cooling_present": False,
|
||||||
"smile_name": "Adam",
|
|
||||||
"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."
|
||||||
@ -221,8 +219,7 @@ async def test_diagnostics(
|
|||||||
"lower_bound": 10,
|
"lower_bound": 10,
|
||||||
"upper_bound": 90,
|
"upper_bound": 90,
|
||||||
"resolution": 1,
|
"resolution": 1,
|
||||||
"cooling_active": False,
|
"binary_sensors": {"heating_state": True},
|
||||||
"heating_state": True,
|
|
||||||
"sensors": {
|
"sensors": {
|
||||||
"water_temperature": 70.0,
|
"water_temperature": 70.0,
|
||||||
"intended_boiler_temperature": 70.0,
|
"intended_boiler_temperature": 70.0,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user