Thanks. It works.
However, other than Tasker, I have been playing around with IFTTT as well, specifically the webhook service.
Then it hit me both are actually using the same thing. So I applied the same concept I used for IFTTT on the built-in tasker HTTP Post task, and it works!
This is what works for me…
In Tasker HTTP Post Task:
Server:Port = https://[HA URL]
Path = /api/webhook/XXXXXXXXXXXXXXXXX (replace with your own URL)
Data / File = { “action”: “call_service”, “service”: “light.turn_on”, “entity_id”: “light.living_room” }
Content Type: application/json
In HA automation:
automation:
trigger:
platform: event
event_type: ifttt_webhook_received
event_data:
action: call_service
action:
service_template: '{{ trigger.event.data.service }}'
data_template:
entity_id: '{{ trigger.event.data.entity_id }}'
I prefer this method because it doesn’t rely on third party plugin.