Can’t get a condition change on an input_slider to turn a switch.
id: status_abanico_habitacion_principal_on
alias: “Status Abanico Habitacion Principal ON”
hide_entity: false
trigger:
condition:
condition: numeric_state
entity_id: input_slider.velocidad_abanico_habitacion_principal
above: 1
action:
service: switch.turn_on
entity_id: switch.abanico_habitacion_principal
treno
(travis reno)
August 30, 2017, 1:45pm
2
First, please format your yaml to make it readable. See the blue bar at the top of your post for instructions
Second, your automation has no trigger so it never gets fired.
Read about triggers here:
Third, try this:
- id: status_abanico_habitacion_principal_on
alias: "Status Abanico Habitacion Principal ON"
hide_entity: false
trigger:
platform: numeric_state
entity_id : input_slider.velocidad_abanico_habitacion_principal
above: 1
action:
service: switch.turn_on
entity_id: switch.abanico_habitacion_principal
Thanks @treno here it goes again properly formatted and complete, cause some of it did not copy correctly the first time. Tried your approach but it does not work. Also, there is a trigger conditioned to the numeric state change of the input_slider, but it does not turn on the switch. However if I change the switch for an input_boolean it works.
- id: status_abanico_habitacion_principal_off
alias: "Status Abanico Habitacion Principal OFF"
hide_entity: false
trigger:
platform: state
entity_id: input_slider.velocidad_abanico_habitacion_principal
condition:
condition: numeric_state
entity_id: input_slider.velocidad_abanico_habitacion_principal
below: 1
action:
- service: switch.turn_off
entity_id: switch.abanico_habitacion_principal