-
Is it possible?
-
Any idea why my script does not do the job for simple commands? Maybe I am not reading the payload correctly?
- id: 'mqtt_action'
alias: MQTT Action
trigger:
- platform: mqtt
topic: hass/action
action:
- service: '{{trigger.payload_json.service}}'
data:
entity_id: '{{trigger.payload_json.entity_id}}'
UPDATE: solved 2 - I had extra " in the payload (was really hard to spot).
I am keeping the thread just in case someone knows a more general solution, than my script.