Monitoring Emby With Home Assistant. Need some help!

For lord’s sake, give some detail man!

What IS output by this template?

Have you tried the template in developer tools?

Bumping an old thread, but this still comes up in Google results. Here’s an improved sensor that doesn’t require listing names of media players to ignore.

  - sensor:
      - name: 'Emby Watching'
        state: >
          {{ states.media_player
            | selectattr('state', 'eq', 'playing')
            | selectattr ('entity_id', 'match', '.*emby.*')
            | list
            | count
          }}
        unit_of_measurement: " Watching"

1 Like

What entity do you use this in conjunction with? media_control? I’m trying to figure out now how to get it to just pick up when a session is going without having to specify a device or user…