I’m trying to create a notification script, with a select selector to decide what type of notification’s sent.
I can’t find how to use the select selector to decide what happens though.
I’ve searched and tried various ways, but just cant get the templates right. How should something like this be done please?
alias: Notification
fields:
type:
selector:
select:
options:
- Normal
- Debug
- Alarm
- Emergency
default: Normal
name: Type
description: Type to send
sequence:
- choose:
- conditions:
- condition: template
value_template: type == Normal
sequence:
- action: switch.turn_off
metadata: {}
target:
entity_id:
- switch.camspare_camera_feed
data: {}
- conditions:
- condition: template
value_template: type == alarm
sequence:
- action: switch.turn_off
metadata: {}
target:
entity_id: switch.camfish_camera_feed
data: {}
mode: single
description: ""
(the switches are just placeholders)