mirror of
https://github.com/home-assistant/core
synced 2024-10-05 09:12:11 +00:00
Add gateway_mode Select to Plugwise (#108019)
This commit is contained in:
parent
3d595fff13
commit
a874895a81
|
@ -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",
|
||||
]
|
||||
|
|
|
@ -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",
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -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": {
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue