JBassett / plex_webhooks

Plex Webhook support for Home Assistant
18 stars 8 forks source link

Add a version parameter in manifest.json #4

Open renaiku opened 1 year ago

renaiku commented 1 year ago

The component is not loading without this parameter.

{
    ...
    "version": "v0.6"
}
{
    "domain": "plex_webhooks",
    "name": "Plex Webhooks",
    "documentation": "https://github.com/JBassett/plex_webhooks",
    "dependencies": [
        "webhook"
    ],
    "codeowners": [
        "@JBassett"
    ],
    "requirements": [],
    "version": "v0.6"
}
Mr-Lucas commented 1 year ago

thanks to you I was able to get this automation to load. However, I am at a loss as to how to use it in home assistant. The instructions say to "Write awesome automations around the new events!" BUT I can't find any reference on what the trigger should be, how to get the payload or status in a condition, etc.

Can you help me figure out what I am missing? Thanks

Mr-Lucas commented 1 year ago

Okay, I figured it out. Odds are this info and my question won't be seen by anyone, but on the off chance it is. Here is one of the automations I created, using this plex webhook as a trigger.

A little context on what I am doing before the code. I have a scope screen and JVC projector in my theater. I populate the Edition tag in plex on each movie with "Scope" or "Flat" depending on the aspect ratio of the movie. I then use plex_webjooks to trigger an automation. That automation uses conditions to see if the event comes from the plex player in my theater, and if the Edition tag is "Scope" use send commands to my JVC projector that masks and zooms appropriately. A similar automation uses a condition of "Flat" to send the appropriate zoom/masking commands.

To see all of the data in the PLEX_EVENT payload, you can listen to the PLEX_EVENT in home assistant. (Developer Tools, Events, Listen to Events, input PLEX_EVENT, start listening.) then play your media in Plex. shortly it will return the payload for your review.

alias: ASPECT RATIO - Scope from PLEX_EVENT description: Use zoom method to Scope aspect ratio and apply masking trigger:

2600box commented 1 year ago

Thank you! Your comment really helped