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

How do I use the results of a kodi service call in an automation?

$
0
0

@Swiss72 wrote:

I am fairly new to Home Assistant, so please excuse me if I am missing something obvious. I’m running Home Assistant 0.107.7 on docker.

I am trying to have Home Assistant change the lens memory of my projector automatically while playing media on Kodi. I have successfully used kodi.call_method to get the correct aspect ratio from Kodi. I see the restult from the service call on the kodi_call_method_result event. Here is the result:

{
    "event_type": "kodi_call_method_result",
    "data": {
        "entity_id": "media_player.kodi",
        "result": {
            "VideoPlayer.VideoAspect": "1.78"
        },
        "result_ok": true,
        "input": {
            "method": "XBMC.GetInfoLabels",
            "params": {
                "labels": [
                    "VideoPlayer.VideoAspect"
                ]
            }
        }
    },
    "origin": "LOCAL",
    "time_fired": "2020-05-03T04:19:28.041848+00:00",
    "context": {
        "id": "f23970eeb6034300856c9e3afed0a613",
        "parent_id": null,
        "user_id": null
    }
}

The value I want to use is in the result (1.78 above), but I am stuck with trying to use that to trigger/action the automation. I plan on using the Harmony Elite integration to send a device command to my projector to change the lens memory.

So what I need is a way to interpret the result on the event from the service call, and depending on the result send the correct command via Harmony.

Any thoughts on how I could make this work?

Any help is appreciated. Cheers.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 105813

Trending Articles



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