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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Versions from 0.40 and up

## Ongoing

- New feature: implement setting Adam zone profile via PR [#958](https://github.com/plugwise/plugwise-beta/pull/958)
- Implement translation for added homeassistantError raise message via PR [#948](https://github.com/plugwise/plugwise-beta/pull/948)
- Line up strings with Core Plugwise strings via PR [#954](https://github.com/plugwise/plugwise-beta/pull/954)

Expand Down
9 changes: 5 additions & 4 deletions custom_components/plugwise/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,16 +129,15 @@

# Select constants
AVAILABLE_SCHEDULES: Final = "available_schedules"
DHW_MODE: Final = "dhw_mode"
DHW_MODES: Final = "dhw_modes"
GATEWAY_MODE: Final = "gateway_mode"
GATEWAY_MODES: Final = "gateway_modes"
REGULATION_MODE: Final = "regulation_mode"
REGULATION_MODES: Final = "regulation_modes"
ZONE_PROFILES: Final = "zone_profiles"
SELECT_DHW_MODE: Final = "select_dhw_mode"
SELECT_GATEWAY_MODE: Final = "select_gateway_mode"
SELECT_REGULATION_MODE: Final = "select_regulation_mode"
SELECT_SCHEDULE: Final = "select_schedule"
SELECT_ZONE_PROFILE: Final = "select_zone_profile"

# Switch constants
DHW_CM_SWITCH: Final = "dhw_cm_switch"
Expand Down Expand Up @@ -198,10 +197,12 @@
"select_gateway_mode",
"select_regulation_mode",
"select_schedule",
"select_zone_profile"
]
type SelectOptionsType = Literal[
"available_schedules",
"dhw_modes",
"gateway_modes",
"regulation_modes",
"available_schedules",
"zone_profiles",
]
2 changes: 1 addition & 1 deletion 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.9.0"],
"requirements": ["plugwise==1.10.0"],
"version": "0.60.0",
"zeroconf": ["_plugwise._tcp.local."]
}
19 changes: 12 additions & 7 deletions custom_components/plugwise/select.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,17 @@

from .const import (
AVAILABLE_SCHEDULES,
DHW_MODE,
DHW_MODES,
GATEWAY_MODE,
GATEWAY_MODES,
LOCATION,
LOGGER,
REGULATION_MODE,
REGULATION_MODES,
SELECT_DHW_MODE,
SELECT_GATEWAY_MODE,
SELECT_REGULATION_MODE,
SELECT_SCHEDULE,
SELECT_ZONE_PROFILE,
ZONE_PROFILES,
SelectOptionsType,
SelectType,
)
Expand All @@ -43,7 +42,7 @@ class PlugwiseSelectEntityDescription(SelectEntityDescription):
options_key: SelectOptionsType


# Upstream + is there a reason we didn't rename this one prefixed?
# Upstream
SELECT_TYPES = (
PlugwiseSelectEntityDescription(
key=SELECT_SCHEDULE,
Expand All @@ -52,22 +51,28 @@ class PlugwiseSelectEntityDescription(SelectEntityDescription):
),
PlugwiseSelectEntityDescription(
key=SELECT_REGULATION_MODE,
translation_key=REGULATION_MODE,
translation_key=SELECT_REGULATION_MODE,
entity_category=EntityCategory.CONFIG,
options_key=REGULATION_MODES,
),
PlugwiseSelectEntityDescription(
key=SELECT_DHW_MODE,
translation_key=DHW_MODE,
translation_key=SELECT_DHW_MODE,
entity_category=EntityCategory.CONFIG,
options_key=DHW_MODES,
),
PlugwiseSelectEntityDescription(
key=SELECT_GATEWAY_MODE,
translation_key=GATEWAY_MODE,
translation_key=SELECT_GATEWAY_MODE,
entity_category=EntityCategory.CONFIG,
options_key=GATEWAY_MODES,
),
PlugwiseSelectEntityDescription(
key=SELECT_ZONE_PROFILE,
translation_key=SELECT_ZONE_PROFILE,
entity_category=EntityCategory.CONFIG,
options_key=ZONE_PROFILES,
),
)


Expand Down
14 changes: 11 additions & 3 deletions custom_components/plugwise/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
}
},
"select": {
"dhw_mode": {
"select_dhw_mode": {
"name": "DHW mode",
"state": {
"auto": "Auto",
Expand All @@ -122,7 +122,7 @@
"off": "Off"
}
},
"regulation_mode": {
"select_regulation_mode": {
"name": "Regulation mode",
"state": {
"bleeding_cold": "Bleeding cold",
Expand All @@ -132,7 +132,7 @@
"off": "Off"
}
},
"gateway_mode": {
"select_gateway_mode": {
"name": "Gateway mode",
"state": {
"away": "Pause",
Expand All @@ -145,6 +145,14 @@
"state": {
"off": "Off"
}
},
"select_zone_profile": {
"name": "Zone profile",
"state": {
"active": "Active",
"off": "Off",
"passive": "Passive"
}
}
},
"sensor": {
Expand Down
14 changes: 11 additions & 3 deletions custom_components/plugwise/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
}
},
"select": {
"dhw_mode": {
"select_dhw_mode": {
"name": "DHW mode",
"state": {
"auto": "Auto",
Expand All @@ -105,15 +105,15 @@
"off": "Off"
}
},
"gateway_mode": {
"select_gateway_mode": {
"name": "Gateway mode",
"state": {
"away": "Pause",
"full": "Normal",
"vacation": "Vacation"
}
},
"regulation_mode": {
"select_regulation_mode": {
"name": "Regulation mode",
"state": {
"bleeding_cold": "Bleeding cold",
Expand All @@ -128,6 +128,14 @@
"state": {
"off": "Off"
}
},
"select_zone_profile": {
"name": "Zone profile",
"state": {
"active": "Active",
"off": "Off",
"passive": "Passive"
}
}
},
"sensor": {
Expand Down
14 changes: 11 additions & 3 deletions custom_components/plugwise/translations/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
}
},
"select": {
"dhw_mode": {
"select_dhw_mode": {
"name": "Modus huishoudelijk warmwater",
"state": {
"auto": "Auto",
Expand All @@ -120,7 +120,7 @@
"off": "Uit"
}
},
"regulation_mode": {
"select_regulation_mode": {
"name": "Regelmodus",
"state": {
"bleeding_cold": "Koud ontluchten",
Expand All @@ -130,7 +130,7 @@
"off": "Uit"
}
},
"gateway_mode": {
"select_gateway_mode": {
"name": "Gateway mode",
"state": {
"away": "Pauze",
Expand All @@ -143,6 +143,14 @@
"state": {
"off": "Uit"
}
},
"select_zone_profile": {
"name": "Zone profiel",
"state": {
"active": "Actief",
"off": "Uit",
"passive": "Passief"
}
}
},
"sensor": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@
"name": "Living room",
"preset_modes": ["vacation", "no_frost", "asleep", "home", "away"],
"select_schedule": "Weekschema",
"select_zone_profile": "active",
"sensors": {
"electricity_consumed": 60.8,
"electricity_produced": 0.0,
Expand All @@ -299,7 +300,8 @@
],
"secondary": []
},
"vendor": "Plugwise"
"vendor": "Plugwise",
"zone_profiles": ["active", "off", "passive"]
},
"f871b8c4d63549319221e294e4f88074": {
"active_preset": "vacation",
Expand All @@ -317,6 +319,7 @@
"name": "Bathroom",
"preset_modes": ["vacation", "no_frost", "asleep", "home", "away"],
"select_schedule": "off",
"select_zone_profile": "passive",
"sensors": {
"electricity_consumed": 0.0,
"electricity_produced": 0.0,
Expand All @@ -332,6 +335,7 @@
"primary": ["e2f4322d57924fa090fbbc48b3a140dc"],
"secondary": ["1772a4ea304041adb83f357b751341ff"]
},
"vendor": "Plugwise"
"vendor": "Plugwise",
"zone_profiles": ["active", "off", "passive"]
}
}
8 changes: 6 additions & 2 deletions tests/components/plugwise/fixtures/m_adam_cooling/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@
"name": "Living room",
"preset_modes": ["vacation", "no_frost", "asleep", "home", "away"],
"select_schedule": "off",
"select_zone_profile": "active",
"sensors": {
"electricity_consumed": 60.8,
"electricity_produced": 0.0,
Expand All @@ -215,7 +216,8 @@
],
"secondary": []
},
"vendor": "Plugwise"
"vendor": "Plugwise",
"zone_profiles": ["active", "off", "passive"]
},
"f871b8c4d63549319221e294e4f88074": {
"active_preset": "vacation",
Expand All @@ -233,6 +235,7 @@
"name": "Bathroom",
"preset_modes": ["vacation", "no_frost", "asleep", "home", "away"],
"select_schedule": "off",
"select_zone_profile": "passive",
"sensors": {
"electricity_consumed": 0.0,
"electricity_produced": 0.0,
Expand All @@ -248,6 +251,7 @@
"primary": ["e2f4322d57924fa090fbbc48b3a140dc"],
"secondary": ["1772a4ea304041adb83f357b751341ff"]
},
"vendor": "Plugwise"
"vendor": "Plugwise",
"zone_profiles": ["active", "off", "passive"]
}
}
8 changes: 6 additions & 2 deletions tests/components/plugwise/fixtures/m_adam_heating/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@
"name": "Living room",
"preset_modes": ["vacation", "no_frost", "asleep", "home", "away"],
"select_schedule": "off",
"select_zone_profile": "active",
"sensors": {
"electricity_consumed": 60.8,
"electricity_produced": 0.0,
Expand All @@ -214,7 +215,8 @@
],
"secondary": []
},
"vendor": "Plugwise"
"vendor": "Plugwise",
"zone_profiles": ["active", "off", "passive"]
},
"f871b8c4d63549319221e294e4f88074": {
"active_preset": "vacation",
Expand All @@ -232,6 +234,7 @@
"name": "Bathroom",
"preset_modes": ["vacation", "no_frost", "asleep", "home", "away"],
"select_schedule": "off",
"select_zone_profile": "passive",
"sensors": {
"electricity_consumed": 0.0,
"electricity_produced": 0.0,
Expand All @@ -247,6 +250,7 @@
"primary": ["e2f4322d57924fa090fbbc48b3a140dc"],
"secondary": ["1772a4ea304041adb83f357b751341ff"]
},
"vendor": "Plugwise"
"vendor": "Plugwise",
"zone_profiles": ["active", "off", "passive"]
}
}
Loading
Loading