Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
2e2dca8
Link to updated backend library
bouwew Jun 21, 2026
c724917
Refresh test-fixtures
bouwew Jun 21, 2026
e74ed94
Rework water_heater to support the updated backend library
bouwew Jun 21, 2026
b5610af
Update constants and deploy
bouwew Jun 21, 2026
66e48b8
Updates
bouwew Jun 21, 2026
fddd81b
Update water_heater testcase
bouwew Jun 21, 2026
101faaa
Fix len asserts in test_update_device()
bouwew Jun 21, 2026
f9ed4a1
Update translations
bouwew Jun 21, 2026
659c8f2
Save updated snapshot files
bouwew Jun 21, 2026
81f1774
Ruffed
bouwew Jun 21, 2026
52a8b6a
More updates
bouwew Jun 21, 2026
6be004b
Remove boiler_temperature as number, moved to water_heater
bouwew Jun 22, 2026
723aabf
Water_heater updates
bouwew Jun 22, 2026
1f218c3
More fixture updates
bouwew Jun 22, 2026
97f7953
More water_heater updates
bouwew Jun 22, 2026
cf50733
Update water_heater unique_id
bouwew Jun 22, 2026
9f45c7a
Update translation strings
bouwew Jun 22, 2026
4693deb
Updates
bouwew Jun 22, 2026
f434ff6
Water_heater test updates
bouwew Jun 22, 2026
361d7a8
Test-number: remove test case, number removed
bouwew Jun 22, 2026
0bbcf92
Fix code
bouwew Jun 22, 2026
16d9b29
Save updated snapshot files
bouwew Jun 23, 2026
1914986
Clean up
bouwew Jun 23, 2026
7e4796d
Correct translation files
bouwew Jun 23, 2026
410184d
Fix requirements format
bouwew Jun 23, 2026
baf4b95
Implement suggested fixes
bouwew Jun 23, 2026
a04bcaf
Update dhw-select translations
bouwew Jun 25, 2026
dbc9d60
Add water_heater state translation string
bouwew Jun 25, 2026
f4c851c
Correct water_heater translation string
bouwew Jun 25, 2026
e274e0c
Fix removed import after rebase
bouwew Jun 26, 2026
d858a6c
Regenerate snapshots after rebase
bouwew Jun 26, 2026
0713bdf
Improve typing, test coverage
bouwew Jun 27, 2026
086ce2f
Update NL translation
bouwew Jun 30, 2026
a5605f7
Correct nl.json
bouwew Jun 30, 2026
2906fe7
Clean up after rebase
bouwew Jul 1, 2026
d67f05e
Add async_turn_off()/on() functions
bouwew Jul 3, 2026
ffbda55
Fix typing
bouwew Jul 4, 2026
5c54515
Add Anna-Loria test fixture
bouwew Jul 4, 2026
ddd2ca5
Save updated shapshot
bouwew Jul 4, 2026
259ad4d
Add testcase setting dhw_mode to off
bouwew Jul 4, 2026
359c2ea
Reorder
bouwew Jul 4, 2026
a172854
Bump plugwise to v1.13.0
bouwew Jul 6, 2026
605da17
Save corrected test-fixtures
bouwew Jul 7, 2026
5b481eb
Correct select determination method
bouwew Jul 7, 2026
b004345
Correct test-asserts
bouwew Jul 7, 2026
028df64
Change select detection to cater for select_dhw_mode is None
bouwew Jul 7, 2026
e0a9c46
Link to latest plugwise test-version
bouwew Jul 31, 2026
578fb54
Refresh test-fixtures
bouwew Jul 31, 2026
7e5126f
Fix manifest.json
bouwew Jul 31, 2026
773429b
Increase len-asserts
bouwew Jul 31, 2026
c370f3f
Update legacy_anna no active schedule test
bouwew Jul 31, 2026
8b67714
Update water_heater.py
bouwew Aug 1, 2026
98c22aa
Climate: adapt set_schedule_state() calls
bouwew Aug 1, 2026
ef2b13f
Adapt test_climate
bouwew Aug 1, 2026
a374c33
Fix typo
bouwew Aug 1, 2026
a936de5
Adapt test_water_heater.py
bouwew Aug 1, 2026
9fffc12
Save updated test-snapshots
bouwew Aug 1, 2026
9fec4f0
Ruff fix
bouwew Aug 1, 2026
1f0acee
Update translations, update water_heater tests
bouwew Aug 1, 2026
94bd1cb
Save updated snapshot
bouwew Aug 1, 2026
5d16b38
Ruff fixes
bouwew Aug 1, 2026
51a68a8
Climate: line up changes with Core PR
bouwew Aug 3, 2026
42ac39e
Adapt climate tests
bouwew Aug 3, 2026
9001a7e
Correct fixture
bouwew Aug 3, 2026
df9389e
Save test snapshot updates
bouwew Aug 3, 2026
a9e2f51
Link to plugwise v1.14.5
bouwew Aug 4, 2026
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
22 changes: 11 additions & 11 deletions custom_components/plugwise/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ def _add_entities() -> None:
entry.async_on_unload(coordinator.async_add_listener(_add_entities))


def _check_for_schedule(active: bool, last_active: str | None) -> None:
def _check_for_schedule(active: bool, last_active: str) -> None:
"""Raise a HAError when no thermostat schedule has been set."""
if not active and last_active is None:
if not active and last_active == STATE_OFF:
raise HomeAssistantError(
translation_domain=DOMAIN,
translation_key=ERROR_NO_SCHEDULE,
Expand Down Expand Up @@ -131,7 +131,7 @@ def __init__(
self._api = coordinator.api
gateway_id: str = self._api.gateway_id
self._gateway_data = coordinator.data[gateway_id]
self._last_active_schedule: str | None = None
self._last_active_schedule = STATE_OFF
self._location = device_id
if (location := self.device.get(LOCATION)) is not None:
self._location = location
Expand Down Expand Up @@ -170,7 +170,7 @@ async def async_added_to_hass(self) -> None:
extra_data = await self.async_get_last_extra_data()
if extra_data is not None:
data = extra_data.as_dict()
self._last_active_schedule = data.get("last_active_schedule")
self._last_active_schedule = data.get("last_active_schedule") or STATE_OFF
self._previous_action_mode = (
data.get("previous_action_mode") or HVACAction.HEATING.value
)
Expand Down Expand Up @@ -244,7 +244,7 @@ def hvac_modes(self) -> list[HVACMode]:
if REGULATION_MODES in self._gateway_data:
hvac_modes.append(HVACMode.OFF)

if self.device.get(AVAILABLE_SCHEDULES, []):
if self.device[AVAILABLE_SCHEDULES] != [STATE_OFF]:
hvac_modes.append(HVACMode.AUTO)

if self._api.cooling_present:
Expand Down Expand Up @@ -329,8 +329,8 @@ async def async_set_hvac_mode(self, hvac_mode: HVACMode) -> None:
await self._api.set_regulation_mode(hvac_mode.value)
return

current_schedule = self.device.get("select_schedule")
schedule_is_active = current_schedule not in (None, "off")
current_schedule = self.device["select_schedule"]
schedule_is_active = current_schedule != STATE_OFF
desired_schedule = (
current_schedule if schedule_is_active else self._last_active_schedule
)
Expand All @@ -339,15 +339,15 @@ async def async_set_hvac_mode(self, hvac_mode: HVACMode) -> None:
if hvac_mode == HVACMode.AUTO:
_check_for_schedule(schedule_is_active, self._last_active_schedule)
await self._api.set_schedule_state(
self._location, STATE_ON, desired_schedule
self._location, desired_schedule, STATE_ON
)
await self._api.set_regulation_mode(self._previous_action_mode)
return

# Transition to manual mode
if schedule_is_active:
await self._api.set_schedule_state(
self._location, STATE_OFF, current_schedule
self._location, current_schedule, STATE_OFF,
)
self._last_active_schedule = current_schedule
regulation = self._regulation_mode_for_hvac(hvac_mode)
Expand All @@ -357,14 +357,14 @@ async def async_set_hvac_mode(self, hvac_mode: HVACMode) -> None:
# Common - transition from auto = schedule off
if self.hvac_mode == HVACMode.AUTO:
await self._api.set_schedule_state(
self._location, STATE_OFF, current_schedule
self._location, current_schedule, STATE_OFF,
)
self._last_active_schedule = current_schedule
return

# Common - transition to auto = schedule on
_check_for_schedule(schedule_is_active, self._last_active_schedule)
await self._api.set_schedule_state(self._location, STATE_ON, desired_schedule)
await self._api.set_schedule_state(self._location, desired_schedule, STATE_ON)

@plugwise_command
@override
Expand Down
15 changes: 9 additions & 6 deletions custom_components/plugwise/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,12 @@
VENDOR: Final = "vendor"

# Number constants
MAX_BOILER_TEMP: Final = "maximum_boiler_temperature"
MAX_DHW_TEMP: Final = "max_dhw_temperature"
LOWER_BOUND: Final = "lower_bound"
RESOLUTION: Final = "resolution"
TEMPERATURE_OFFSET: Final = "temperature_offset"
UPPER_BOUND: Final = "upper_bound"

# Sensor constants
DHW_TEMP: Final = "dhw_temperature"
DHW_SETPOINT: Final = "domestic_hot_water_setpoint"
EL_CONSUMED: Final = "electricity_consumed"
EL_CONS_INTERVAL: Final = "electricity_consumed_interval"
Expand Down Expand Up @@ -150,6 +147,10 @@
COOLING_ENA_SWITCH: Final ="cooling_ena_switch"
SWITCHES: Final = "switches"

# Water_heater constants
BOILER_TEMP: Final = "boiler_temperature"
DHW_TEMP: Final = "dhw_temperature"

# Default directives
DEFAULT_PORT: Final[int] = 80
DEFAULT_TIMEOUT: Final[int] = 30
Expand Down Expand Up @@ -188,11 +189,8 @@
}

type NumberType = Literal[
"maximum_boiler_temperature",
"max_dhw_temperature",
"temperature_offset",
]

type SelectType = Literal[
"select_dhw_mode",
"select_gateway_mode",
Expand All @@ -207,3 +205,8 @@
"regulation_modes",
"zone_profiles",
]
type WaterHeaterType = Literal[
"boiler_temperature",
"dhw_temperature",
]
type WaterHeaterOptionsType = Literal["dhw_modes"]
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.12.0"],
"version": "0.65.0",
"requirements": ["plugwise==1.14.5"],
"version": "0.65.1",
"zeroconf": ["_plugwise._tcp.local."]
}
10 changes: 0 additions & 10 deletions custom_components/plugwise/number.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
from .const import (
LOGGER,
LOWER_BOUND,
MAX_BOILER_TEMP,
RESOLUTION,
TEMPERATURE_OFFSET,
UPPER_BOUND,
Expand All @@ -40,13 +39,6 @@ class PlugwiseNumberEntityDescription(NumberEntityDescription):

# Upstream + is there a reason we didn't rename this one prefixed?
NUMBER_TYPES = (
PlugwiseNumberEntityDescription(
key=MAX_BOILER_TEMP,
translation_key=MAX_BOILER_TEMP,
device_class=NumberDeviceClass.TEMPERATURE,
entity_category=EntityCategory.CONFIG,
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
),
PlugwiseNumberEntityDescription(
key=TEMPERATURE_OFFSET,
translation_key=TEMPERATURE_OFFSET,
Expand Down Expand Up @@ -121,8 +113,6 @@ def __init__(
self._attr_native_min_value = ctrl.get(LOWER_BOUND, 0.0) # Upstream const

native_step = ctrl.get(RESOLUTION, 0.5) # Upstream const
if description.key != TEMPERATURE_OFFSET: # Upstream const
native_step = max(native_step, 0.5)
self._attr_native_step = native_step

@property
Expand Down
2 changes: 1 addition & 1 deletion custom_components/plugwise/select.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def _add_entities() -> None:
for device_id in coordinator.new_devices:
device = coordinator.data[device_id]
for description in SELECT_TYPES:
if device.get(description.options_key):
if device.get(description.key) is not None:
entities.append(
PlugwiseSelectEntity(coordinator, device_id, description)
)
Expand Down
30 changes: 16 additions & 14 deletions custom_components/plugwise/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,6 @@
}
},
"number": {
"max_dhw_temperature": {
"name": "Domestic hot water setpoint"
},
"maximum_boiler_temperature": {
"name": "Maximum boiler temperature setpoint"
},
"temperature_offset": {
"name": "Temperature offset"
}
Expand All @@ -108,7 +102,7 @@
"name": "DHW mode",
"state": {
"comfort": "Comfort",
"off": "Off"
"eco": "Eco"
}
},
"select_gateway_mode": {
Expand Down Expand Up @@ -299,13 +293,21 @@
}
},
"water_heater": {
"plugwise": {
"state": {
"auto": "Auto",
"boost": "Boost",
"comfort": "Comfort",
"eco": "Eco",
"off": "Off"
"boiler_temperature": {
"name": "Boiler"
},
"dhw_temperature": {
"name": "Domestic hot water",
"state_attributes": {
"dhw_modes": {
"state": {
"auto": "Auto",
"boost": "Boost",
"comfort": "Comfort",
"eco": "Eco",
"off": "Off"
}
}
}
}
}
Expand Down
30 changes: 16 additions & 14 deletions custom_components/plugwise/translations/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,6 @@
}
},
"number": {
"max_dhw_temperature": {
"name": "Instelpunt sanitair warm water"
},
"maximum_boiler_temperature": {
"name": "Instelpunt maximale boiler temperatuur"
},
"temperature_offset": {
"name": "Temperatuurcompensatie"
}
Expand All @@ -108,7 +102,7 @@
"name": "SWW modus",
"state": {
"comfort": "Comfort",
"off": "Uit"
"eco": "Eco"
}
},
"select_gateway_mode": {
Expand Down Expand Up @@ -299,13 +293,21 @@
}
},
"water_heater": {
"plugwise": {
"state": {
"auto": "Auto",
"boost": "Boost",
"comfort": "Comfort",
"eco": "Eco",
"off": "Off"
"boiler_temperature": {
"name": "Boiler"
},
"dhw_temperature": {
"name": "Sanitair warm water",
"state_attributes": {
"dhw_modes": {
"state": {
"auto": "Auto",
"boost": "Boost",
"comfort": "Comfort",
"eco": "Eco",
"off": "Uit"
}
}
}
}
}
Expand Down
Loading
Loading