Ok I did some tests:
- when I use this in automations.yaml:
- alias: 'ifttt integration'
trigger:
- event_data:
action: call_service
event_type: ifttt_webhook_received
platform: event
action:
- data_template:
entity_id: '{{ trigger.event.data.entity_id }}'
command: '{{ trigger.event.data.command }}'
params: '{{ trigger.event.data.params }}'
service_template: '{{ trigger.event.data.service }}'
and this code in ifttt:
{ "action": "call_service", "service": "light.turn_off", "entity_id": "light.floor_lamp" }
nothing happens with the lamp but the event listener logs this:
{
"event_type": "ifttt_webhook_received",
"data": {
"action": "call_service",
"service": "light.turn_off",
"entity_id": "light.floor_lamp",
"webhook_id": "6bea8edc0fb6eadbddb6b2cb251350814f3cf10062a82cb351693a6dbf6ed10c"
},
"origin": "LOCAL",
"time_fired": "2020-01-03T23:44:46.477551+00:00",
"context": {
"id": "83a45e8efe3a4ba2be09052f687edb56",
"parent_id": null,
"user_id": null
}
}
- but when I use this in automations.yaml:
- alias: 'ifttt integration'
trigger:
- event_data:
action: call_service
event_type: ifttt_webhook_received
platform: event
action:
- data_template:
entity_id: '{{ trigger.event.data.entity_id }}'
# command: '{{ trigger.event.data.command }}'
# params: '{{ trigger.event.data.params }}'
service_template: '{{ trigger.event.data.service }}'
the light actually turns off but the event listener in HA still logs the same:
{
"event_type": "ifttt_webhook_received",
"data": {
"action": "call_service",
"service": "light.turn_off",
"entity_id": "light.floor_lamp",
"webhook_id": "6bea8edc0fb6eadbddb6b2cb251350814f3cf10062a82cb351693a6dbf6ed10c"
},
"origin": "LOCAL",
"time_fired": "2020-01-03T23:47:09.757138+00:00",
"context": {
"id": "25c2d804cb944af5a2a83ff7aec83305",
"parent_id": null,
"user_id": null
}
}
Now I, at least, know that connection between IFTTT > HASS works.
Also tried:
{ “action”: “call_service”, “service”: “vacuum.locate", "entity_id": "vacuum.rocky" }
which worked yesterday, but now it isnt working anymore. Grrrrr. Ok so this works, I used the wrong quotation marks. This works: { "action": "call_service", "service": "vacuum.locate", "entity_id": "vacuum.rocky" }
======
Ok, so now I am where you are:
Unable to send command to the vacuum: {'code': -10000, 'message': 'data for segment is not a number'}
Interesting… value number of the room works in HA when I use services in dev options.