I am testing the new webhook trigger in 0.80 and have managed to set up an automation to send a notification to see what a Plex webhook looks like…
- alias: 'plex_webhook_test'
initial_state: 'True'
trigger:
- platform: webhook
webhook_id: plex_webhook_test
action:
- service: notify.hass
data_template:
message: >
{{ trigger.data }}
title: "Plex Webhook Test"
This successfully sends the following notification on each play/pause/stop/resume…
<MultiDictProxy(‘payload’: bytearray(b’{“event”:“media.resume”,“user”:true,“owner”:true,“Account”:{“id”:1,“thumb”:“https://plex.tv/users/REDACTED/avatar?c=1538338798",“title”:“REDACTED”},“Server”:{“title”:“NAS”,“uuid”:“REDACTED”},“Player”:{“local”:true,“publicAddress”:"",“title”:“Chrome”,“uuid”:“REDACTED”},“Metadata”:{“librarySectionType”:“show”,“ratingKey”:“248”,“key”:"/library/metadata/248",“parentRatingKey”:“237”,“grandparentRatingKey”:“236”,“guid”:“com.plexapp.agents.thetvdb://72668/1/11?lang=en”,“librarySectionTitle”:" Kids TV”,“librarySectionID”:1,“librarySectionKey”:"/library/sections/1",“type”:“episode”,“title”:“The Black Island (2)”,“titleSort”:“Black Island (2)”,“grandparentKey”:"/library/metadata/236",“parentKey”:"/library/metadata/237",“grandparentTitle”:“The Adventures of Tintin”,“parentTitle”:“Season 1”,“contentRating”:“TV-G”,“summary”:"Tintin follows M\xc3\x83\xc2\xbcller and Ivan to Kiltoch.\r\nIn Kiltoch he gets to know about Blac
Anyone know how to use this data to create meaningful Plex automations? (So far all my attempts at templates have failed with various error messages)
Cheers,
James