switches
(map)(Required)The array that contains all command switches.
identifier
(map)(Required)Name of the command switch as slug. Multiple entries are possible.
command_on
(string)(Required)The action to take for on.
command_off
(string)(Required)The action to take for off.
command_state
(string)(Optional)If given, this command will be run. Returning a result code 0 will indicate that the switch is on.
value_template
(string)(Optional)If specified, command_state will ignore the result code of the command but the template evaluating to true will indicate the switch is on.
friendly_name
(string)(Optional)The name used to display the switch in the frontend.