I have the following code as part of my automations.yaml:
- alias: "IR commands"
trigger:
platform: state
entity_id: switch.my_power
to: "on"
action:
service: mqtt.publish
data:
topic: "cmnd"
payload: '{"gyumolcs":"alma"}'
While all the other automation in the same file work properly, this one doesn’t get triggered. The entity id is correct, the state does become on when switched, the service works in the Developer tools/Services page.
I have just started using automation, so it is probably something very trivial, like a missing/extra space/etc.
I shortened the topic here a bit, true, but it’s besides the point as it works properly when tried from the Developer tools/Services page. Also, the topic here should work as well, it’s a valid mqtt topic (i admit it is unusual )
Then if this is all good, any idea how I can investigate it? Any specific log, etc?