Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 95919

Help with IFTTT webhook

$
0
0

@whit-tj wrote:

I am trying to take data from an ifttt webhook and display/update a sensor.

I am using the Mojio ifttt to report on our vehicle location when a trip completes, and I want to display the car location and trip info in HA. If I can create a device_tracker from the webhook’s body data that would be great, but I’d be fine with just a sensor to display address/time/etc.

My IFTTT is running without issue. I’m properly integrated to IFTTT, since I am successfully sending events to IFTTT in other automations. But I cannot get things to work with HA consuming the webhook.

This is my json body being posted with my nabucasa url:

{ "date": {{CreatedAt}}, "friendly_name" : {{VehicleName}}, "start_address" : {{StartAddress}}, "end_address" : {{EndAddress}}, "total_miles" : {{DistanceMiles}} }

It appears that my webhook is being received based on this log:

Received message for unregistered webhook ##############################

1:45 PM components/webhook/init.py (WARNING) - message first occurred at 9:17 AM and shows up 30 times

Is the only way to register this webhook is to make an automation in my yaml? I’ve seen lots of examples like this:

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 }}'

But all those examples seem to be sending event data in the body. I have data fields I want turned into a sensor or device_tracker. Is there a way to just create a new entity with the body of the webhook? or send it in mqtt and have that create a sensor? Any help or advice would be appreciated, I feel like I’m close, but I can’t figure out how to access that data, all the examples I’m finding are just firing off events in HA.

Thanks!

Posts: 4

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 95919

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>