Error loading /config/configuration.yaml: while parsing a block mapping
in "/config/packages/garden/garden_extra_template_switches_renaming.yaml", line 5, column 9
expected <block end>, but found '<block mapping start>'
in "/config/packages/garden/garden_extra_template_switches_renaming.yaml", line 6, column 11
Hi!
I am in the exact same situation where I would need to get the status of a Sonoff Basic including unavailable for when there is no power to that Sonoff device. Iâve read the thread but being new to all this donât understand what needs to be added where. Could someone kindly indicate what needs to be done?
ok. So I added that into my configuration.yaml file, restarted and while I do have a new switch I can add it stays off all the time and when I click on it, it reverts to off after a few seconds. I donât see any unavailable neither. What am I missing?
Sounds like you have not entered the correct switch, did you replace switch.xxx with the correct entity?
Check in Developer tools -> States for a list of the entities available
Thatâs the behavior you get when value_template is incorrect.
value_template is used to report the template switchâs state. If you instruct a template switch to turn on and its state reverts to off, it means value_template failed to evaluate to true.
Post your template switchâs configuration so we can help you fix the problem.
Thanks for the help. Iâve narrowed down the issue and somehow fix the errors I was getting however {{ states(âswitch.xxxâ) }} gives me âonâ even when the Sonoff is unplugged (well it was on before - when off before unplugging it was off when unplugged).
Iâve noticed however that Wifi signal becomes âunknownâ so I might use this instead to tell me when the Sonoff is unavailble.
If you have any idea of what Iâm missing please let me know.