Skip to content

Instantly share code, notes, and snippets.

@Didgeridrew
Created February 1, 2024 04:29
Show Gist options
  • Save Didgeridrew/3dda268eb86919f3c2cda1c245386c89 to your computer and use it in GitHub Desktop.
Save Didgeridrew/3dda268eb86919f3c2cda1c245386c89 to your computer and use it in GitHub Desktop.
HA - Demostrating Nested Logical Conditions
alias: Nested logical conditions
sequence:
- choose:
- alias: This works
conditions:
- condition: not
conditions:
- condition: template
value_template: false
sequence:
- service: persistent_notification.create
data:
message: not (false)
- choose:
- conditions:
- condition: not
conditions:
- condition: template
value_template: true
sequence:
- service: persistent_notification.create
data:
message: not (true)
- choose:
- conditions:
- condition: not
conditions:
- condition: template
value_template: true
- condition: template
value_template: false
sequence:
- service: persistent_notification.create
data:
message: not (true, false)
- choose:
- alias: This works
conditions:
- condition: not
conditions:
- and:
- condition: template
value_template: true
- condition: template
value_template: false
sequence:
- service: persistent_notification.create
data:
message: not (and(true, false))
mode: single
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment