#I am relatively new to HA I have been
1 messages · Page 1 of 1 (latest)
The quotes themselves don't matter, just that they're different
"{{ states('sensor.steam1234') in ('online', 'away') }}"
^ --- outer quotes, quoting the whole template --- ^
^----------------^ ^------^ ^----^
inner quotes, quoting the strings
{{ means that this is a #templates-archived - see the docs linked from that channel's topic
|float is one way of turning a number to a float, and is the old way - see also the #templates-archived channel
The YAML editor is expecting the contents of a script, you're pasting a whole script
@lucid shard What is the difference between "contents" and "whole" in reference to a script? Is there this difference with Automations, Scenes, and Helpers?
No need to ping me, I'm in the thread 😉
script:
message_temperature:
sequence:
- service: notify.notify
data:
message: "Current temperature is {{ states('sensor.temperature') }}"
That is a whole script, the entire thing
The UI editor however handles the top two lines behind the scenes
sequence:
- service: notify.notify
data:
message: "Current temperature is {{ states('sensor.temperature') }}"
``` is what you'd paste into the UI editor top right -> _Edit in YAML_ option