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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

Versions from 0.40 and up

## v0.65.2

- Replace DHW comfort mode switch with select, restore number translations via PR [#1160](https://github.com/plugwise/plugwise-beta/pull/1160)

## v0.65.1

- Revert native temperature properties updates
Expand Down
2 changes: 1 addition & 1 deletion custom_components/plugwise/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
"iot_class": "local_polling",
"loggers": ["plugwise"],
"requirements": ["plugwise>=1.14.7"],
"version": "0.65.1",
"version": "0.65.2",
"zeroconf": ["_plugwise._tcp.local."]
}
5 changes: 1 addition & 4 deletions custom_components/plugwise/select.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,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.key) and (
description.key not in (DHW_MODE, SELECT_DHW_MODE)
or len(device[description.options_key]) > 2
):
if device.get(description.key):
Comment thread
coderabbitai[bot] marked this conversation as resolved.
entities.append(
PlugwiseSelectEntity(coordinator, device_id, description)
)
Expand Down
7 changes: 0 additions & 7 deletions custom_components/plugwise/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

from .const import (
COOLING_ENA_SWITCH,
DHW_CM_SWITCH,
LOCK,
LOGGER, # pw-beta
MEMBERS,
Expand All @@ -41,12 +40,6 @@ class PlugwiseSwitchEntityDescription(SwitchEntityDescription):

# Upstream consts
PLUGWISE_SWITCHES: tuple[PlugwiseSwitchEntityDescription, ...] = (
PlugwiseSwitchEntityDescription(
key=DHW_CM_SWITCH,
translation_key=DHW_CM_SWITCH,
device_class=SwitchDeviceClass.SWITCH,
entity_category=EntityCategory.CONFIG,
),
PlugwiseSwitchEntityDescription(
key=LOCK,
translation_key=LOCK,
Expand Down
6 changes: 6 additions & 0 deletions custom_components/plugwise/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,12 @@
}
},
"number": {
"max_dhw_temperature": {
"name": "Domestic hot water setpoint"
},
"maximum_boiler_temperature": {
"name": "Maximum boiler temperature setpoint"
},
"temperature_offset": {
"name": "Temperature offset"
}
Expand Down
6 changes: 6 additions & 0 deletions custom_components/plugwise/translations/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,12 @@
}
},
"number": {
"max_dhw_temperature": {
"name": "Instelpunt sanitair warm water"
},
"maximum_boiler_temperature": {
"name": "Instelpunt maximale boiler temperatuur"
},
"temperature_offset": {
"name": "Temperatuurcompensatie"
}
Expand Down
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.65.1"
version = "0.65.2"
description = "Plugwise beta custom-component"
readme = "README.md"
requires-python = ">=3.14"
Expand Down
64 changes: 32 additions & 32 deletions tests/components/plugwise/snapshots/test_number.ambr
Original file line number Diff line number Diff line change
Expand Up @@ -609,17 +609,17 @@
'state': '-0.5',
})
# ---
# name: test_anna_number_entities[platforms0-True-anna_heatpump_heating][number.opentherm_temperature-entry]
# name: test_anna_number_entities[platforms0-True-anna_heatpump_heating][number.opentherm_domestic_hot_water_setpoint-entry]
EntityRegistryEntrySnapshot({
'aliases': list([
None,
]),
'area_id': None,
'capabilities': dict({
<NumberEntityCapabilityAttribute.MAX: 'max'>: 100.0,
<NumberEntityCapabilityAttribute.MIN: 'min'>: 0.0,
<NumberEntityCapabilityAttribute.MAX: 'max'>: 60.0,
<NumberEntityCapabilityAttribute.MIN: 'min'>: 35.0,
<NumberEntityCapabilityAttribute.MODE: 'mode'>: <NumberMode.BOX: 'box'>,
<NumberEntityCapabilityAttribute.STEP: 'step'>: 1.0,
<NumberEntityCapabilityAttribute.STEP: 'step'>: 0.01,
}),
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
Expand All @@ -628,59 +628,59 @@
'disabled_by': None,
'domain': 'number',
'entity_category': <EntityCategory.CONFIG: 'config'>,
'entity_id': 'number.opentherm_temperature',
'entity_id': 'number.opentherm_domestic_hot_water_setpoint',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'object_id_base': 'Temperature',
'object_id_base': 'Domestic hot water setpoint',
'options': dict({
}),
'original_device_class': <NumberDeviceClass.TEMPERATURE: 'temperature'>,
'original_icon': None,
'original_name': 'Temperature',
'original_name': 'Domestic hot water setpoint',
'platform': 'plugwise',
'previous_unique_id': None,
'suggested_object_id': None,
'supported_features': 0,
'translation_key': 'maximum_boiler_temperature',
'unique_id': '1cbf783bb11e4a7c8a6843dee3a86927-boiler_temperature',
'translation_key': 'max_dhw_temperature',
'unique_id': '1cbf783bb11e4a7c8a6843dee3a86927-dhw_temperature',
'unit_of_measurement': <UnitOfTemperature.CELSIUS: '°C'>,
})
# ---
# name: test_anna_number_entities[platforms0-True-anna_heatpump_heating][number.opentherm_temperature-state]
# name: test_anna_number_entities[platforms0-True-anna_heatpump_heating][number.opentherm_domestic_hot_water_setpoint-state]
StateSnapshot({
'attributes': ReadOnlyDict({
<EntityStateAttribute.DEVICE_CLASS: 'device_class'>: 'temperature',
<EntityStateAttribute.FRIENDLY_NAME: 'friendly_name'>: 'OpenTherm Temperature',
<NumberEntityCapabilityAttribute.MAX: 'max'>: 100.0,
<NumberEntityCapabilityAttribute.MIN: 'min'>: 0.0,
<EntityStateAttribute.FRIENDLY_NAME: 'friendly_name'>: 'OpenTherm Domestic hot water setpoint',
<NumberEntityCapabilityAttribute.MAX: 'max'>: 60.0,
<NumberEntityCapabilityAttribute.MIN: 'min'>: 35.0,
<NumberEntityCapabilityAttribute.MODE: 'mode'>: <NumberMode.BOX: 'box'>,
<NumberEntityCapabilityAttribute.STEP: 'step'>: 1.0,
<NumberEntityCapabilityAttribute.STEP: 'step'>: 0.01,
<EntityStateAttribute.UNIT_OF_MEASUREMENT: 'unit_of_measurement'>: <UnitOfTemperature.CELSIUS: '°C'>,
}),
'context': <ANY>,
'entity_id': 'number.opentherm_temperature',
'entity_id': 'number.opentherm_domestic_hot_water_setpoint',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': '60.0',
'state': '53.0',
})
# ---
# name: test_anna_number_entities[platforms0-True-anna_heatpump_heating][number.opentherm_temperature_2-entry]
# name: test_anna_number_entities[platforms0-True-anna_heatpump_heating][number.opentherm_maximum_boiler_temperature_setpoint-entry]
EntityRegistryEntrySnapshot({
'aliases': list([
None,
]),
'area_id': None,
'capabilities': dict({
<NumberEntityCapabilityAttribute.MAX: 'max'>: 60.0,
<NumberEntityCapabilityAttribute.MIN: 'min'>: 35.0,
<NumberEntityCapabilityAttribute.MAX: 'max'>: 100.0,
<NumberEntityCapabilityAttribute.MIN: 'min'>: 0.0,
<NumberEntityCapabilityAttribute.MODE: 'mode'>: <NumberMode.BOX: 'box'>,
<NumberEntityCapabilityAttribute.STEP: 'step'>: 0.01,
<NumberEntityCapabilityAttribute.STEP: 'step'>: 1.0,
}),
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
Expand All @@ -689,45 +689,45 @@
'disabled_by': None,
'domain': 'number',
'entity_category': <EntityCategory.CONFIG: 'config'>,
'entity_id': 'number.opentherm_temperature_2',
'entity_id': 'number.opentherm_maximum_boiler_temperature_setpoint',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'object_id_base': 'Temperature',
'object_id_base': 'Maximum boiler temperature setpoint',
'options': dict({
}),
'original_device_class': <NumberDeviceClass.TEMPERATURE: 'temperature'>,
'original_icon': None,
'original_name': 'Temperature',
'original_name': 'Maximum boiler temperature setpoint',
'platform': 'plugwise',
'previous_unique_id': None,
'suggested_object_id': None,
'supported_features': 0,
'translation_key': 'max_dhw_temperature',
'unique_id': '1cbf783bb11e4a7c8a6843dee3a86927-dhw_temperature',
'translation_key': 'maximum_boiler_temperature',
'unique_id': '1cbf783bb11e4a7c8a6843dee3a86927-boiler_temperature',
'unit_of_measurement': <UnitOfTemperature.CELSIUS: '°C'>,
})
# ---
# name: test_anna_number_entities[platforms0-True-anna_heatpump_heating][number.opentherm_temperature_2-state]
# name: test_anna_number_entities[platforms0-True-anna_heatpump_heating][number.opentherm_maximum_boiler_temperature_setpoint-state]
StateSnapshot({
'attributes': ReadOnlyDict({
<EntityStateAttribute.DEVICE_CLASS: 'device_class'>: 'temperature',
<EntityStateAttribute.FRIENDLY_NAME: 'friendly_name'>: 'OpenTherm Temperature',
<NumberEntityCapabilityAttribute.MAX: 'max'>: 60.0,
<NumberEntityCapabilityAttribute.MIN: 'min'>: 35.0,
<EntityStateAttribute.FRIENDLY_NAME: 'friendly_name'>: 'OpenTherm Maximum boiler temperature setpoint',
<NumberEntityCapabilityAttribute.MAX: 'max'>: 100.0,
<NumberEntityCapabilityAttribute.MIN: 'min'>: 0.0,
<NumberEntityCapabilityAttribute.MODE: 'mode'>: <NumberMode.BOX: 'box'>,
<NumberEntityCapabilityAttribute.STEP: 'step'>: 0.01,
<NumberEntityCapabilityAttribute.STEP: 'step'>: 1.0,
<EntityStateAttribute.UNIT_OF_MEASUREMENT: 'unit_of_measurement'>: <UnitOfTemperature.CELSIUS: '°C'>,
}),
'context': <ANY>,
'entity_id': 'number.opentherm_temperature_2',
'entity_id': 'number.opentherm_maximum_boiler_temperature_setpoint',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': '53.0',
'state': '60.0',
})
# ---
59 changes: 59 additions & 0 deletions tests/components/plugwise/snapshots/test_select.ambr
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,65 @@
'state': 'active',
})
# ---
# name: test_adam_2_select_entities[platforms0-True-m_adam_cooling][select.opentherm_dhw_mode-entry]
EntityRegistryEntrySnapshot({
'aliases': list([
None,
]),
'area_id': None,
'capabilities': dict({
<SelectEntityCapabilityAttribute.OPTIONS: 'options'>: list([
'comfort',
'eco',
]),
}),
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'select',
'entity_category': <EntityCategory.CONFIG: 'config'>,
'entity_id': 'select.opentherm_dhw_mode',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'object_id_base': 'DHW mode',
'options': dict({
}),
'original_device_class': None,
'original_icon': None,
'original_name': 'DHW mode',
'platform': 'plugwise',
'previous_unique_id': None,
'suggested_object_id': None,
'supported_features': 0,
'translation_key': 'select_dhw_mode',
'unique_id': '056ee145a816487eaa69243c3280f8bf-select_dhw_mode',
'unit_of_measurement': None,
})
# ---
# name: test_adam_2_select_entities[platforms0-True-m_adam_cooling][select.opentherm_dhw_mode-state]
StateSnapshot({
'attributes': ReadOnlyDict({
<EntityStateAttribute.FRIENDLY_NAME: 'friendly_name'>: 'OpenTherm DHW mode',
<SelectEntityCapabilityAttribute.OPTIONS: 'options'>: list([
'comfort',
'eco',
]),
}),
'context': <ANY>,
'entity_id': 'select.opentherm_dhw_mode',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': 'eco',
})
# ---
# name: test_adam_select_entities[platforms0][select.badkamer_thermostat_schedule-entry]
EntityRegistryEntrySnapshot({
'aliases': list([
Expand Down
Loading