Help with or statement as part of a script within choose

I have a script with several choose parts that works well

I Want to add an extra choose with my first OR statment.
I bollean must be tuned off when
scene thuis is off OR
when slapen is on…

This is the part of the script, but i cat an error on it…

          - choose:
            - conditions:
              - condition: or
              conditions:
                - condition: state
                  entity_id: input_boolean.scene_thuis
                  state: "off"
                - condition: state
                  entity_id: input_boolean.scene_slapen
                  state: "on"
              sequence:
                - service: input_boolean.turn_off
                  data: {}
                  target:
                    entity_id:
                      - input_boolean.basisvoorziening
                  enabled: true

        - choose:
            - conditions:
                - or:
                  - condition: state
                    entity_id: input_boolean.scene_thuis
                    state: "off"
                  - condition: state
                    entity_id: input_boolean.scene_slapen
                    state: "on"
              sequence:
                - service: input_boolean.turn_off
                  data: {}
                  target:
                    entity_id:
                      - input_boolean.basisvoorziening
                  enabled: true

Thanks Taras!
It works…

1 Like