Cannot have 2 differents IFTTT events to be received in HomeAssistant, heeeelp ! :-)

Hello !

I am facing issues when trying to receive 2 IFTTT events considered as triggers in Homeassistant.
I want to receive through IFTTT :

  • my alarm status and
  • some door sensor status

The alarm status is received thanks to this automation :

- id: iftt_event
  alias: IFTTT Réception Evenements
  trigger:
  - event_data:
      action: call_service
    event_type: ifttt_webhook_received
    platform: event
  action:
  - data_template:
      entity_id: '{{ trigger.event.data.entity_id }}'
      state: '{{ trigger.event.data.state }}'
    service_template: '{{ trigger.event.data.service }}'

As you can see, there is a need to have as data_template two mandatories elements :

  • an entity_id and
  • a state

However, to receive the door sensor status from IFTTT, the state item needs to be removed from the data_template.

Is is possible to have two differents IFTTT automations with two differents structures (one with the state element, the other one without) ?
If so, how can I do that ?

Thank you

Solved with this code (input.boolean is for the door sensor) :


- id: iftt_event
  alias: IFTTT Réception Evenements
  trigger:
  - event_data:
      action: call_service
      service: alarm_control_panel.ifttt_push_alarm_state
    event_type: ifttt_webhook_received
    platform: event
  action:
  - data_template:
      entity_id: '{{ trigger.event.data.entity_id }}'
      state: '{{ trigger.event.data.state }}'
    service_template: '{{ trigger.event.data.service }}'

- id: iftt_event_input_boolean_on
  trigger:
    platform: event
    event_type: ifttt_webhook_received
    event_data:
      action: call_service
      service: input_boolean.turn_on
  action:
    service_template: input_boolean.turn_on
    data_template:
      entity_id: '{{ trigger.event.data.entity_id }}'
    
- id: iftt_event_input_boolean_off
  trigger:
    platform: event
    event_type: ifttt_webhook_received
    event_data:
      action: call_service
      service: input_boolean.turn_off
  action:
    service_template: input_boolean.turn_off
    data_template:
      entity_id: '{{ trigger.event.data.entity_id }}'

Hope it can help someone else :wink: