I’m new at Home Assistant and I’am trying to disover possibilities of HA.
I created two python script to emulate a MQTT auto-disocery capable switch and light endpoint.
Both are discovered by HA and work properly.
I tried to make two automation (ON/OFF) with automation editor to link the switch to the light but never worked. If I activate its manually the light turn on or off, but if I emulate a switching from the python script or the web UI the automations were not triggered.
Is there any limitations for auto-discovered entities automation?
Or what did I do wrong?
OK, I found the problem. It works now.
I published from the script “ON” or “OFF” state but the state is “on” or “off” in HA. So the states are case sensitive strings, but I don’t understand why change my published upper case state to lower case? Or it is defined in switch component?