I have a automation action, that on condition flips a input number to a certain number. but the next condition action flips it again if the input number from the last action has already flipped it. How do i make sure this only happens once per automation? With the choose option?
Here is the automation:
- condition: numeric_state
entity_id: input_number.yuka_angle_helper
above: 89
below: 91
then:
- action: input_number.set_value
metadata: {}
data:
value: 0
target:
entity_id: input_number.yuka_angle_helper
- if:
- condition: numeric_state
entity_id: input_number.yuka_angle_helper
below: 1
then:
- action: input_number.set_value
metadata: {}
data:
value: 90
target:
entity_id: input_number.yuka_angle_helper
- choose:
- conditions:
- condition: numeric_state
entity_id: input_number.yuka_angle_helper
below: 1
sequence:
- action: input_number.set_value
metadata: {}
data:
value: 0
target:
entity_id: input_number.yuka_angle_helper
- conditions:
- condition: numeric_state
entity_id: input_number.yuka_angle_helper
above: 89
below: 91
sequence:
- action: input_number.set_value
metadata: {}
data:
value: 0
target:
entity_id: input_number.yuka_angle_helper```
Will the choose do its job? can i remove the If's from actions?