Update README.md
This commit is contained in:
31
README.md
31
README.md
@@ -64,34 +64,3 @@ These sensors are created on-the-fly when a stream starts and are removed when i
|
|||||||
- `video_codec`: The video codec being used.
|
- `video_codec`: The video codec being used.
|
||||||
- `audio_codec`: The audio codec being used.
|
- `audio_codec`: The audio codec being used.
|
||||||
- `avg_bitrate`: The average bitrate of the stream.
|
- `avg_bitrate`: The average bitrate of the stream.
|
||||||
|
|
||||||
## Example Lovelace Card
|
|
||||||
|
|
||||||
You can use a Markdown card in your Home Assistant dashboard to display a clean summary of all active streams.
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
type: markdown
|
|
||||||
title: Active Dispatcharr Streams
|
|
||||||
content: |
|
|
||||||
{% set streams = states.sensor
|
|
||||||
| selectattr('attributes.channel_name', 'defined')
|
|
||||||
| selectattr('entity_id', 'search', 'dispatcharr_')
|
|
||||||
| list %}
|
|
||||||
{% if streams %}
|
|
||||||
{% for stream in streams %}
|
|
||||||
**{{ stream.attributes.channel_name }} ({{- stream.attributes.channel_number -}})**
|
|
||||||
|
|
||||||
*Now Playing:* {{ stream.attributes.program_title }}
|
|
||||||
|
|
||||||
{% if stream.attributes.episode_title %}
|
|
||||||
*Episode:* {{ stream.attributes.episode_title }} ({{- stream.attributes.episode_number -}})
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
*Clients:* {{ stream.attributes.clients }} | *Resolution:* {{ stream.attributes.resolution }}
|
|
||||||
{% if not loop.last %}
|
|
||||||
***
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
{% else %}
|
|
||||||
No active streams.
|
|
||||||
{% endif %}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user