#Boolean Selector in Script

5 messages · Page 1 of 1 (latest)

hexed pollen
#

Hi, I'm having an issue with creating a script for sending notifications. I want a toggle switch that determines whether the notification are sent to speakers or not.

I have an input field that's a boolean selector,

  selector:
    boolean: {}
  name: Send to Speakers
  description: Toggle sending notification to speakers
  default: true```
but the issue is using this boolean as a condition. I assumed using: 

```condition: template
value_template: "{{ send_to_speakers }}"
enabled: true```
would work, but it always returns false.

Any help would be greatly appreciated - I'm losing my mind on this one, and have not been able to find any resources.
tired merlin
#

it's for the UI only

#

if you want to provide a default yourself... "{{ send_to_speakers | default(True) }}"

hexed pollen
#

Ohhh! Thanks, I'll give that another look then. Thanks.