Which I’m sure is right. I have an automation that triggers whenever it gets an update from the mqtt sensor (which ariela sends regularly). I only want it to turn my lights on if I am connected to my SSID. My automation looks like this:
I think I don’t have my condition setup right. Do I have the right idea? What do I need to change? I checked it online and it says this is valid YAML, but something must be wrong. Any help is appreciated.
Did you ever get this ironed out? I’m trying to get the same type of thing working using Ariela as well. and can’t seem to get the automation to trigger. I can get the correct SSID name when I use the Template editor, but cannot seem to get the automation to trigger with {{ state_attr(‘sensor.wifi_status’, ‘ssid’) == ‘MY_SSID’ }} as a condition. I validate the config and it’s ok, but nothing triggers, even after a restart.
I’m new at this, so I have been trying to find an example that works, but no luck. It seems that the “comparison” doesn’t work right.
The implication is that the string it displays for SSID may contain spaces (at either end) or special characters (like a literal newline or something else that isn’t readily visible).
I can’t simulate a wifi sensor (I don’t have one) but I can use the sun component to prove the == test works correctly.
I have gotten it to work. One problem you may be facing is that when ariela publishes the ssid it includes the double quotes as part of the string. You may need to use escape characters in your configuration.
You both were right on target, The output that Ariela publishes does in fact has the double quote as part of the string. Adding the escape characters and the double quotes let my automation run as I wanted.
Thanks for help.