From 2a67f93990fff09ea731d75a2eb02ee401e87b3d Mon Sep 17 00:00:00 2001 From: Lyfesaver <61745478+lyfesaver74@users.noreply.github.com> Date: Fri, 3 Oct 2025 15:59:56 -0500 Subject: [PATCH] Update README.md --- README.md | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 0bd1f7d..f4f1379 100644 --- a/README.md +++ b/README.md @@ -73,14 +73,25 @@ You can use a Markdown card in your Home Assistant dashboard to display a clean type: markdown title: Active Dispatcharr Streams content: | - {% for stream in states.sensor | selectattr('attributes.channel_name', 'defined') | selectattr('entity_id', 'search', 'dispatcharr_') %} - **{{ 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 }} - *** + {% 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 %}