I have the following code, but it’s not working or working unpredictably. I basically just want to use the choose option to do one of two things (this will be one of 8 things, hence choose) based on which input_boolean entity turning on, triggered it.
trigger:
- platform: state
entity_id:
- input_boolean.ib1
- input_boolean.ib2
from: "off"
to: "on"
condition:
condition: time
weekday:
- sun
- sat
- fri
- mon
action:
- choose:
# IF 1
- conditions:
- condition: template
value_template: "{{ trigger.to_state_object_id == ib1 }}"
sequence:
- service: notify.telegram_justin
data:
message: ib1
- choose:
# IF 2
- conditions:
- condition: template
value_template: "{{ trigger.to_state_object_id == ib2 }}"
sequence:
- service: notify.telegram_justin
data:
message: ib2