nasgul
1
Trying to create a script to set the option of an input_select to a speciific value. What am I doing wrong?
set home status to sleep
set_sleep_mode:
alias: 'Sleep Mode'
sequence:
- service: input_select.select_option
data:
entitiy_id: input_select.status
option: Sleep
Option: sleep
should be option: âSleepâ
See a comparable script in this post:
nasgul
3
Thanks for your help. I tried that but executing the script still leaves the input_select.status on âNormalâ
see the detail:
form configuration.yaml
input_select:
status:
name: Home Status
options:
- Normal
- Evening
- Night
- Sleep
initial: Normal
from the script.yaml
set_sleep_mode:
alias: 'Sleep Mode'
sequence:
- service: input_select.select_option
data:
entitiy_id: input_select.status
option: 'Sleep'
I trigger the script from the HA platfrom but the option remains at normal
I think the script should have data_template:
, not data:
Only thing I see is spelling error on âentitiy_idâ.
The only time you need data_template is if you are defining a template, which you are not.
1 Like
nasgul
6
Wow, apologies for being so blind about the spelling.
Thanks a lot
N
1 Like