Skip to content

Commit

Permalink
Make sure to always populate status
Browse files Browse the repository at this point in the history
This makes sure the automation event_data filtering works.
  • Loading branch information
JBassett authored Oct 8, 2019
1 parent 3cfe7b6 commit 43c17b5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions custom_components/plex_webhooks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,11 @@ async def handle_webhook(hass, webhook_id, request):
logging.warn('Issue decoding webhook: ' + part.text())
return None

data['playerUuid'] = data['Player']['uuid']

event = data['event']
# We always want to set the status because if we don't then the event
# trigger filtering doesn't work
data['status'] = event

playing = ['media.play', 'media.resume']
stopped = ['media.pause', 'media.stop']
grabbed = ['library.new']
Expand Down

0 comments on commit 43c17b5

Please sign in to comment.