If I use the choose action and end up with no actions in my action block, will this generate an error / warning?
I currently have conditions in the condition block to prevent this, but wonder if it is necessary.
- alias: 'Get Deck Tone Level'
trigger:
- platform: state
entity_id: sensor.deck_bass_level
- platform: state
entity_id: sensor.deck_treble_level
condition:
- condition: or ### Do I need this? ###
conditions:
- condition: template
value_template: "{{ states('sensor.deck_bass_level') != states('input_number.deck_bass_level') }}"
- condition: template
value_template: "{{ states('sensor.deck_treble_level') != states('input_number.deck_treble_level') }}"
- condition: template
value_template: "{{ states('sensor.deck_bass_level') not in ['Unknown', 'None', 'Unavailable'] }}"
- condition: template
value_template: "{{ states('sensor.deck_treble_level') not in ['Unknown', 'None', 'Unavailable'] }}"
action:
- choose:
- conditions:
- condition: template
value_template: "{{ states('sensor.deck_bass_level') != states('input_number.deck_bass_level') }}"
sequence:
- service: input_number.set_value
data:
entity_id: input_number.deck_bass_level
value: "{{ states('sensor.deck_bass_level')|float }}"
- choose:
- conditions:
- condition: template
value_template: "{{ states('sensor.deck_treble_level') != states('input_number.deck_treble_level') }}"
sequence:
- service: input_number.set_value
data:
entity_id: input_number.deck_treble_level
value: "{{ states('sensor.deck_treble_level')|float }}"