Hi! I’m a pretty new user therefore I’m sorry if what I’m asking may be pretty obvious.
I’m writing code to automate lovelace’s dashboards by modifying yaml files with App Daemon’s add-on.
It’s pretty frustrating to write characters as single and double quotes by using YAML libraries, and sadly I want to write:
state:
- value: 'on'
which is harder than it seems to be.
I’m able to write:
state:
- value: on
but that’s no good.
So I was wondering if there is some way around this problem by writing equivalent ways of value: ‘on’.
I tried to create a variable (the custom component):
This is trying to find the state of the literal string ‘var.onvalue’, even if you did not have the quotes around your variable it would evaluate to “{{ states(‘on’) }}” which is not how you use states()