Open Symbiot78 opened 1 year ago
Just noticed that there is a problem in that file, my setup is a little different, I have a Sonos mediaplayer that is connected to an input in a receiver, depending on what input you select, the selected source is displayed.
Try to add this in aleborg_frontend\templates\partials\media\auto-entities\include.yaml
:
- entity_id: media_player.*
area: {{title}}
device_manufacturer: Sonos
options: !include ../sonos/media_sonos.yaml
At first try that did not help. Didn’t have time to play around with it though. But adding it did nothing.
When you do changes to any yaml file, do a small change in tablet.yaml as well, just a new line (empty), ha won't notice changes to other files.
Tried your trick Also remove device manufacturer No luck
I tried adding it to the lights section. here it works. it fails because it cannot find the sonos card (which i didn't add to the path) - so fair enough that it throws an error. But it actually tries.
so area etc is correct. But no matter what I try I cannot get the media card to pickup the sonos. Even if i hardcode the entity_id as I did with the lights..
this in the include.yaml for media:
Does NOT work.
but adding it to include.yaml in lights.. and it is added to the lights section.
hm.... I've tried every iteration and combination of files & parameters I can think of. I simply cannot get the sonos entity to show under media tab.
Ok, so this is my templates\partials\media\auto-entities\include.yaml
file right now.
With this code I get the Sonos card
# lovelace_gen
# Receivers and speakers
#############################################
- entity_id: media_player.*
area: {{title}}
not:
integration: "cast"
or:
- attributes:
device_class: speaker
- attributes:
device_class: receiver
options: !include ../receiver/media_receiver.yaml
# Chromecast speakers
#############################################
- entity_id: media_player.*
area: {{title}}
integration: "cast"
not:
- attributes:
device_class: tv
options: !include ../cast/media_cast_speaker.yaml
# Chromecast TV's
#############################################
- entity_id: media_player.*
area: {{title}}
integration: "cast"
attributes:
device_class: tv
options: !include ../cast/media_cast_tv.yaml
- entity_id: media_player.*
area: {{title}}
attributes:
media_content_id: "*sonos*"
options: !include ../sonos/media_sonos.yaml
Strangely that does not change anything
I moved to my living_room area which contains a tv & my appleTV both media_player entities and none of them show up
it’s as if the whole media ‘partials’ are not being picked up. I tested the showMedia as well and setting it to false removes the media tab.
am going to play with moving media to lights section just to test
That's really weird, all my media shows up in the correct places, google speakers, sonos etc
Very
I will try and looked at the tabbed.yaml and see if I can follow the paths as it seems the media yaml files are being ignored.
the issue is the same on both my dev and my prod HA server.
I tried a bunch of different things.. for one I had Music_assistant integration installed which is defunct because a new build is in the works. got that removed, reinstalled sonos integration. Somehow.. I got sonos to show up.. BUt.. Was playing with the media_sonos file and now I lost it again.
I think it's a cache thing from lovelace_gen but I cannot figure out how to refresh it. I've done all the usual, reload, refresh, change tablet file etc etc.
Of course I removed my changed from media_sonos file.. but to no avail.. quite strange.
can it have anything to do with this from the logs?:
while scanning for the next token found character '%' that cannot start any token in "/config/includes/lovelace/aleborg_frontend/common/views.yaml", line 7, column 2
gave this another try.. I had given up.
but today was the day I succeeded.. too much even.
I replaced ALL files from this repo - then added
'
That gave me the sonos card.. but it also added another mediaplayer.. or rather.. the other media_player was there before.
I commented out all other media player lines in the file (the CAST ones) .. that removed the 'extra' media player. So that's ok for now. I don't use any cast integration but maybe it's there by default from HA.
hi..
More digging..
So I found that if i comment out this part below.. the extra media player line disappears..
`- entity_id: media_player.* area: {{title}} not: integration: "cast" or:
as soon as I re-enable it.. the speaker is back. I've tested it a few times.. and every time .. same result. so the above code somehow thinkgs that the sonos speaker is supposed to be picked up.
reading auto-entities github
not: integration: "cast" or:
for the above.. is the plan to say :
don't use integration cast devices.. but DO use either speaker or receiver.. ?
Hi, sorry for the late reply, I've have had a lot to do lately. I think I know what the problem is, I'm doing all the changes and I hope that I will be able to finish it during next week. It's a lot of changes that needs to be done sadly.
I'm also updating the frontend with a new settings file in json format so that we don't need to restart HA every time the settings file is edited
Hi A No worries.. it's your stuff - I'm just liking the layout and want to adapt some.. maybe..
I've been playing a bit with the media_sonos.yaml file and did this to get rid of groupings etc.. I don't see the need.
` type: vertical-stack cards:
`
Hi
So continuing my journey through your dashboard - I wanted to get my sonos added under one of the rooms.
if I understand correctly the room tab would use the include.yaml from here:
aleborg_frontend\templates\partials\media\auto-entities
and looking in the yaml file it appears that you are excluding speaker device class - which of course sonos is. but maybe that's on purpose. I then tried adding my own:
`#############################################
but it makes no difference.. it ignores my device and gives me a blank page.
I've triple checked that my sonos device in in the "kitchen" area - which now is setup correctly.
so should the auto-entities not be picking this up?