Hello,
I have configured a working ifttt webhook automation to fill Google keep list (from here)
- alias: Google Keep list update from google assistant and ifttt
trigger:
platform: event
event_type: ifttt_webhook_received
event_data:
action: call_service
action:
service_template: '{{ trigger.event.data.service }}'
data_template:
title: '{{ trigger.event.data.title }}'
things: '{{ trigger.event.data.things }}'
I want to add another webhook to change the state of an input_boolean.
I have defined it like this on ifttt:
{ "action":"call_service", "service":"input_boolean.turn_on", "entity_id": "input_boolean.living_ac" }
However, I get an error when using the webhook, I get an error from the automation:
2019-08-23 00:30:37 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection.1777890832] Sending {'id': 2, 'type': 'event', 'event': {'event_type': 'ifttt_webhook_received', 'data': {'action': 'call
_service', 'service': 'input_boolean.turn_on', 'entity_id': 'input_boolean.living_ac', 'webhook_id': 'abcdefgh12345678abcdefgh12345678abcdefgh12345678'}, 'origin': 'LOCAL', 'time_fired': datetime.date
time(2019, 8, 22, 21, 30, 37, 147999, tzinfo=<UTC>), 'context': {'id': 'abcdefgh12345678', 'parent_id': None, 'user_id': None}}}
2019-08-23 00:30:37 INFO (MainThread) [homeassistant.components.automation] Executing Google Keep list update from google assistant and ifttt
2019-08-23 00:30:37 INFO (MainThread) [homeassistant.helpers.script] Script Google Keep list update from google assistant and ifttt: Running script
2019-08-23 00:30:37 INFO (MainThread) [homeassistant.helpers.script] Script Google Keep list update from google assistant and ifttt: Executing step call service
2019-08-23 00:30:37 ERROR (MainThread) [homeassistant.components.automation] Error while executing automation automation.google_keep_list_update_from_google_assistant_and_ifttt. Invalid data for call_service at pos 1
: extra keys not allowed @ data['title']
If I understand correctly, the automation expects a non-existing field “title”.
So I thought about adding a condition to the automation to ignore it if the field does not exist:
condition:
- condition: template
value_template: '{% if trigger.event.data.title != none %}True{% else %}False{% endif %}'
But it doesn’t seem to work. Nor does this:
value_template: '{% if trigger.event.data.title is not defined %}True{% else %}False{% endif %}'
what am I doing wrong?