Windows > Third Party Plug-ins, Programs, and Skins
Home Assistant integration for jriver
mattkhan:
--- Quote from: sjhilton on October 29, 2024, 09:58:54 pm ---Hi mattkhan - I'm not sure if this is feasible, but it would be great to have either a search or filter function. Eg a filter function that could be applied to the 'browse media' popup when it opens. I've tried crafting my own with a variety of different custom cards and javascript, but it's proven quite difficult to get working. Just a thought.
--- End quote ---
yes definitely, this is a big gap in the media browse feature in the HA UI (along with the ability to customise what information is shown) and the main thing missing from my old custom UI. It's a moderately sized undertaking to create such a custom card though and I don't like javascript very much so haven't been inclined to make one yet.
avpman:
--- Quote from: mattkhan on October 30, 2024, 04:28:39 am ---the data is there, you need to configure some view yourself to display that
--- End quote ---
Hopefully, someone could share what they've done. I'm still relatively new to HomeAssistant and have no idea how to accomplish this.
mattkhan:
--- Quote from: avpman on October 30, 2024, 08:24:49 am ---Hopefully, someone could share what they've done. I'm still relatively new to HomeAssistant and have no idea how to accomplish this.
--- End quote ---
there was a basic example in https://yabb.jriver.com/interact/index.php/topic,137808.msg969917.html#msg969917
sjhilton's version looks nicer (I made no attempt to format mine, it was just to illustrate)
sjhilton:
Here is the code for mine. The square bracketed sections need to be completed with your player entity/custom text and the comments are for further explanation. Any questions please let me know.
(This should have the odd formatting fixed as well, which I fixed using https://onlineyamltools.com/minify-yaml and removing additional \n entries. I think this is a quirk of the YAML editor in HA.)
--- Code: ---type: entities
entities:
- entity: media_player.[entity] # this bit is optional if you wanted to have a player function integrated. I didn't include this in mine as I use mini media player. It could be improved.
name: [insert text]
- type: custom:hui-element # this custom card needs to be installed using HACS or manually
card_type: markdown
content: >
## [Your title]
{% for track in state_attr('sensor.[name]_playlist',
'entries') %} {% if is_state_attr('media_player.[name]',
'media_title', track.Name) %} **{{ track.Name }}** <span
style="margin-left: 10px; font-size: smaller; display: block; margin-top:
-8px;">
{{ track["Track #"] }} - {{ track.Artist }} - {{ track.Album }} - {{ '%02d:%02d' % (track.Duration // 60, track.Duration % 60) }} ({{ '%02d:%02d' % (state_attr('media_player.[name]', 'media_position') // 60, state_attr('media_player.[name]', 'media_position') % 60) }})
</span> {% else %} {{ track.Name }} <span style="margin-left: 10px;
font-size: smaller; display: block; margin-top: -8px;">
{{ track["Track #"] }} - {{ track.Artist }} - {{ track.Album }} - {{ '%02d:%02d' % (track.Duration // 60, track.Duration % 60) }}
</span> {% endif %} <br> {% endfor %}
visibility: # Completely optional - I made my playlist disappear if media isn't playing. Delete these lines if you don't want to do this.
- condition: state
entity: media_player.[name]
state: playing
--- End code ---
rhgh:
Home Assistant MC version 0.3.3
Media Center Windows 32.0.58
Since today the following error message
Setup failed, will try again: unhandled errors in a TaskGroup (1 sub-exception)
no devices and no entities.
Home Assistant log as attachment
Reinhard
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version