* Add invert option to switch_as_x * Store invert flag in entity options * Add options flow * Update strings * Add tests * Address review comment * Update homeassistant/components/switch_as_x/strings.json Co-authored-by: G Johansson <goran.johansson@shiftit.se> * Address review comments * Inline get_suggested which was only used once in tests * Address review comments --------- Co-authored-by: G Johansson <goran.johansson@shiftit.se>
30 lines
839 B
JSON
30 lines
839 B
JSON
{
|
|
"title": "Change device type of a switch",
|
|
"config": {
|
|
"step": {
|
|
"user": {
|
|
"description": "Pick a switch that you want to show up in Home Assistant as a light, cover or anything else. The original switch will be hidden.",
|
|
"data": {
|
|
"entity_id": "Switch",
|
|
"invert": "Invert state",
|
|
"target_domain": "New Type"
|
|
},
|
|
"data_description": {
|
|
"invert": "Invert state, only supported for cover, lock and valve."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"options": {
|
|
"step": {
|
|
"init": {
|
|
"data": {
|
|
"invert": "[%key:component::switch_as_x::config::step::user::data::invert%]"
|
|
},
|
|
"data_description": {
|
|
"invert": "[%key:component::switch_as_x::config::step::user::data_description::invert%]"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|