Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions custom_components/plugwise/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,13 @@
from .const import (
ACTIVE_PRESET,
AVAILABLE_SCHEDULES,
BINARY_SENSORS,
CLIMATE_MODE,
CONF_HOMEKIT_EMULATION, # pw-beta homekit emulation
CONTROL_STATE,
COOLING_PRESENT,
COOLING_STATE,
DEV_CLASS,
DOMAIN,
GATEWAY_ID,
HEATING_STATE,
LOCATION,
LOGGER,
LOWER_BOUND,
Expand Down Expand Up @@ -250,18 +247,9 @@ def hvac_action(self) -> HVACAction: # pw-beta add to Core
# Keep track of the previous action-mode
self._previous_action_mode(self.coordinator)

# Adam provides the hvac_action for each thermostat
if (action := self.device.get(CONTROL_STATE)) is not None:
return HVACAction(action)

# Anna
heater: str = self._gateway["heater_id"]
heater_data = self._devices[heater]
if heater_data[BINARY_SENSORS][HEATING_STATE]:
return HVACAction.HEATING
if heater_data[BINARY_SENSORS].get(COOLING_STATE, False):
return HVACAction.COOLING

return HVACAction.IDLE

@property
Expand Down
4 changes: 2 additions & 2 deletions custom_components/plugwise/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"integration_type": "hub",
"iot_class": "local_polling",
"loggers": ["plugwise"],
"requirements": ["plugwise==1.6.3"],
"version": "0.55.3",
"requirements": ["plugwise==1.6.4"],
"version": "0.55.4",
"zeroconf": ["_plugwise._tcp.local."]
}
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "plugwise-beta"
version = "0.55.3"
version = "0.55.4"
description = "Plugwise beta custom-component"
readme = "README.md"
requires-python = ">=3.12"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,23 +162,14 @@
},
"dev_class": "gateway",
"firmware": "3.7.8",
"gateway_modes": [
"away",
"full",
"vacation"
],
"gateway_modes": ["away", "full", "vacation"],
"hardware": "AME Smile 2.0 board",
"location": "bc93488efab249e5bc54fd7e175a6f91",
"mac_address": "012345679891",
"model": "Gateway",
"model_id": "smile_open_therm",
"name": "Adam",
"regulation_modes": [
"bleeding_hot",
"bleeding_cold",
"off",
"heating"
],
"regulation_modes": ["bleeding_hot", "bleeding_cold", "off", "heating"],
"select_gateway_mode": "full",
"select_regulation_mode": "heating",
"sensors": {
Expand Down Expand Up @@ -240,13 +231,7 @@
"dev_class": "climate",
"model": "ThermoZone",
"name": "Living room",
"preset_modes": [
"no_frost",
"asleep",
"vacation",
"home",
"away"
],
"preset_modes": ["no_frost", "asleep", "vacation", "home", "away"],
"select_schedule": "Weekschema",
"sensors": {
"electricity_consumed": 149.9,
Expand All @@ -260,9 +245,7 @@
"upper_bound": 35.0
},
"thermostats": {
"primary": [
"ad4838d7d35c4d6ea796ee12ae5aedf8"
],
"primary": ["ad4838d7d35c4d6ea796ee12ae5aedf8"],
"secondary": []
},
"vendor": "Plugwise"
Expand All @@ -281,13 +264,7 @@
"dev_class": "climate",
"model": "ThermoZone",
"name": "Bathroom",
"preset_modes": [
"no_frost",
"asleep",
"vacation",
"home",
"away"
],
"preset_modes": ["no_frost", "asleep", "vacation", "home", "away"],
"select_schedule": "Badkamer",
"sensors": {
"electricity_consumed": 0.0,
Expand All @@ -301,12 +278,8 @@
"upper_bound": 99.9
},
"thermostats": {
"primary": [
"e2f4322d57924fa090fbbc48b3a140dc"
],
"secondary": [
"1772a4ea304041adb83f357b751341ff"
]
"primary": ["e2f4322d57924fa090fbbc48b3a140dc"],
"secondary": ["1772a4ea304041adb83f357b751341ff"]
},
"vendor": "Plugwise"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,24 +60,16 @@
},
"3cb70739631c4d17a86b8b12e8a5161b": {
"active_preset": "home",
"available_schedules": [
"standaard",
"off"
],
"available_schedules": ["standaard", "off"],
"climate_mode": "auto",
"control_state": "heating",
"dev_class": "thermostat",
"firmware": "2018-02-08T11:15:53+01:00",
"hardware": "6539-1301-5002",
"location": "c784ee9fdab44e1395b8dee7d7a497d5",
"model": "ThermoTouch",
"name": "Anna",
"preset_modes": [
"no_frost",
"home",
"away",
"asleep",
"vacation"
],
"preset_modes": ["no_frost", "home", "away", "asleep", "vacation"],
"select_schedule": "standaard",
"sensors": {
"cooling_activation_outdoor_temperature": 21.0,
Expand Down
15 changes: 3 additions & 12 deletions tests/components/plugwise/fixtures/anna_v4/all_data.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,16 @@
"devices": {
"01b85360fdd243d0aaad4d6ac2a5ba7e": {
"active_preset": "home",
"available_schedules": [
"Standaard",
"Thuiswerken",
"off"
],
"available_schedules": ["Standaard", "Thuiswerken", "off"],
"climate_mode": "heat",
"control_state": "heating",
"dev_class": "thermostat",
"firmware": "2018-02-08T11:15:53+01:00",
"hardware": "6539-1301-5002",
"location": "eb5309212bf5407bb143e5bfa3b18aee",
"model": "ThermoTouch",
"name": "Anna",
"preset_modes": [
"vacation",
"no_frost",
"away",
"asleep",
"home"
],
"preset_modes": ["vacation", "no_frost", "away", "asleep", "home"],
"select_schedule": "off",
"sensors": {
"illuminance": 60.0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,14 @@
"0d266432d64443e283b5d708ae98b455": {
"active_preset": "home",
"climate_mode": "heat",
"control_state": "heating",
"dev_class": "thermostat",
"firmware": "2017-03-13T11:54:58+01:00",
"hardware": "6539-1301-500",
"location": "0000aaaa0000aaaa0000aaaa0000aa00",
"model": "ThermoTouch",
"name": "Anna",
"preset_modes": [
"away",
"vacation",
"asleep",
"home",
"no_frost"
],
"preset_modes": ["away", "vacation", "asleep", "home", "no_frost"],
"sensors": {
"illuminance": 150.8,
"setpoint": 20.5,
Expand Down
38 changes: 8 additions & 30 deletions tests/components/plugwise/fixtures/m_adam_cooling/all_data.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,7 @@
},
"dev_class": "gateway",
"firmware": "3.7.8",
"gateway_modes": [
"away",
"full",
"vacation"
],
"gateway_modes": ["away", "full", "vacation"],
"hardware": "AME Smile 2.0 board",
"location": "bc93488efab249e5bc54fd7e175a6f91",
"mac_address": "012345679891",
Expand Down Expand Up @@ -152,13 +148,7 @@
"dev_class": "climate",
"model": "ThermoZone",
"name": "Living room",
"preset_modes": [
"no_frost",
"asleep",
"vacation",
"home",
"away"
],
"preset_modes": ["no_frost", "asleep", "vacation", "home", "away"],
"select_schedule": "off",
"sensors": {
"electricity_consumed": 149.9,
Expand All @@ -172,9 +162,7 @@
"upper_bound": 35.0
},
"thermostats": {
"primary": [
"ad4838d7d35c4d6ea796ee12ae5aedf8"
],
"primary": ["ad4838d7d35c4d6ea796ee12ae5aedf8"],
"secondary": []
},
"vendor": "Plugwise"
Expand All @@ -188,18 +176,12 @@
"Weekschema",
"off"
],
"climate_mode": "cool",
"control_state": "auto",
"climate_mode": "auto",
"control_state": "cooling",
"dev_class": "climate",
"model": "ThermoZone",
"name": "Bathroom",
"preset_modes": [
"no_frost",
"asleep",
"vacation",
"home",
"away"
],
"preset_modes": ["no_frost", "asleep", "vacation", "home", "away"],
"select_schedule": "Badkamer",
"sensors": {
"electricity_consumed": 0.0,
Expand All @@ -213,12 +195,8 @@
"upper_bound": 99.9
},
"thermostats": {
"primary": [
"e2f4322d57924fa090fbbc48b3a140dc"
],
"secondary": [
"1772a4ea304041adb83f357b751341ff"
]
"primary": ["e2f4322d57924fa090fbbc48b3a140dc"],
"secondary": ["1772a4ea304041adb83f357b751341ff"]
},
"vendor": "Plugwise"
}
Expand Down
41 changes: 7 additions & 34 deletions tests/components/plugwise/fixtures/m_adam_heating/all_data.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,23 +78,14 @@
},
"dev_class": "gateway",
"firmware": "3.7.8",
"gateway_modes": [
"away",
"full",
"vacation"
],
"gateway_modes": ["away", "full", "vacation"],
"hardware": "AME Smile 2.0 board",
"location": "bc93488efab249e5bc54fd7e175a6f91",
"mac_address": "012345679891",
"model": "Gateway",
"model_id": "smile_open_therm",
"name": "Adam",
"regulation_modes": [
"bleeding_hot",
"bleeding_cold",
"off",
"heating"
],
"regulation_modes": ["bleeding_hot", "bleeding_cold", "off", "heating"],
"select_gateway_mode": "full",
"select_regulation_mode": "heating",
"sensors": {
Expand Down Expand Up @@ -156,13 +147,7 @@
"dev_class": "climate",
"model": "ThermoZone",
"name": "Living room",
"preset_modes": [
"no_frost",
"asleep",
"vacation",
"home",
"away"
],
"preset_modes": ["no_frost", "asleep", "vacation", "home", "away"],
"select_schedule": "off",
"sensors": {
"electricity_consumed": 149.9,
Expand All @@ -176,9 +161,7 @@
"upper_bound": 35.0
},
"thermostats": {
"primary": [
"ad4838d7d35c4d6ea796ee12ae5aedf8"
],
"primary": ["ad4838d7d35c4d6ea796ee12ae5aedf8"],
"secondary": []
},
"vendor": "Plugwise"
Expand All @@ -197,13 +180,7 @@
"dev_class": "climate",
"model": "ThermoZone",
"name": "Bathroom",
"preset_modes": [
"no_frost",
"asleep",
"vacation",
"home",
"away"
],
"preset_modes": ["no_frost", "asleep", "vacation", "home", "away"],
"select_schedule": "Badkamer",
"sensors": {
"electricity_consumed": 0.0,
Expand All @@ -217,12 +194,8 @@
"upper_bound": 99.9
},
"thermostats": {
"primary": [
"e2f4322d57924fa090fbbc48b3a140dc"
],
"secondary": [
"1772a4ea304041adb83f357b751341ff"
]
"primary": ["e2f4322d57924fa090fbbc48b3a140dc"],
"secondary": ["1772a4ea304041adb83f357b751341ff"]
},
"vendor": "Plugwise"
}
Expand Down
Loading
Loading