Add gateway_mode Select to Plugwise (#108019)

This commit is contained in:
Bouwe Westerdijk 2024-01-16 14:35:09 +01:00 committed by GitHub
parent 3d595fff13
commit a874895a81
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 21 additions and 0 deletions

View file

@ -44,11 +44,13 @@ NumberType = Literal[
SelectType = Literal[
"select_dhw_mode",
"select_gateway_mode",
"select_regulation_mode",
"select_schedule",
]
SelectOptionsType = Literal[
"dhw_modes",
"gateway_modes",
"regulation_modes",
"available_schedules",
]

View file

@ -50,6 +50,14 @@ SELECT_TYPES = (
command=lambda api, loc, opt: api.set_dhw_mode(opt),
options_key="dhw_modes",
),
PlugwiseSelectEntityDescription(
key="select_gateway_mode",
translation_key="gateway_mode",
icon="mdi:cog-outline",
entity_category=EntityCategory.CONFIG,
command=lambda api, loc, opt: api.set_gateway_mode(opt),
options_key="gateway_modes",
),
)

View file

@ -97,6 +97,14 @@
"comfort": "[%key:component::climate::entity_component::_::state_attributes::preset_mode::state::comfort%]"
}
},
"gateway_mode": {
"name": "Gateway mode",
"state": {
"away": "Pause",
"full": "Normal",
"vacation": "Vacation"
}
},
"regulation_mode": {
"name": "Regulation mode",
"state": {

View file

@ -54,6 +54,9 @@ async def test_adam_select_regulation_mode(
Also tests a change in climate _previous mode.
"""
state = hass.states.get("select.adam_gateway_mode")
assert state
assert state.state == "full"
state = hass.states.get("select.adam_regulation_mode")
assert state
assert state.state == "cooling"