hass-browser_mod
hass-browser_mod copied to clipboard
What is the browserID of my current device?
Hi all and thanks in advance for any advice:
I want to grab the browserID of my current computer. The idea is to use this as an input for figuring out what adjustments I need to make for a picture-elements panel card. I know there are probably other ways to deal with the picture-elements card, but I thought this might be the simplest.
Thanks.
ben
Following code works for me
- service: media_player.play_media
data:
entity_id: |
[[[
return 'media_player.' + (window.browser_mod.browserID).replaceAll('-','_');
]]]
media_content_id: https://stream.qmusic.nl/qmusic/aachigh
media_content_type: url
Hi all, I'm probably doing something wrong, but the above code doesn't seem to work here. I don't get any value out of window.browser_mod.browserID. I doublechecked it in a mushroom-template card to see what the string would be. But it remains empty. Any idea what I am overlooking?
For this issue/feature request, I vote for a seperate device: media_player.this_browser that is always pointing at the browser the dashboard is running on. This makes it much easier for users.