So, I’m having some issues getting this script to work after replacing a doorsensor.
The script is triggered by some automations that will lock my front door (Danalock V3), but it should (of course) only lock the door if the door is closed.
I can not understand why the script is not working anymore…help?
Thats what I thought was a problem too, but without I get:
Error loading /home/homeassistant/.homeassistant/configuration.yaml: while parsing a block mapping
in "/home/homeassistant/.homeassistant/scripts.yaml", line 161, column 5
expected <block end>, but found '<scalar>'
in "/home/homeassistant/.homeassistant/scripts.yaml", line 162, column 34
Since I’m not very familiar with xml/yaml etc I dont know what it means really…
I don’t know exactly why, but in most cases, single quotes and double quotes can be used interchangeably for simple statements. Like this line could be:
timeout: ‘120’
or
timeout: “120”
but when you’re dealing with data templates, which are complex statements usually use both single and double quotes, you have to use quotes consistently. It’s a coding thing that you need to get used to.
You can use either. Quotes surround a string (= text as opposed to a number)
Only thing is of you need a string within a string you need to use both : one set to surround the overall string, and a different set for the inner string which was your issue here