Closed Stooovie closed 2 years ago
Hmmm nice request It's not possible right now because the card only accept icons from MaterialDesign and HBO Max doesn't exist there
I have plans to add support to any icon available for HASS in future updates, but rn i don't know how to do it :p
But i know how to make it support custom svg paths for icons and i guess i can make it fast since the original tv-card did it for Prime Video
BTW i did not find an icon for HBO Max, only for HBO at SimpleIcons
Oh, I am sorry, this is a very cool feature (how do you guys work so fast?) but I haven't been clear - what I wanted was the button for switching into the HBO Max app. "spotify" or "netflix" are simple but I can't get HBO Max app to show up in the card (in the source row).
In short, I don't know what to write in the source_row to get a HBO Max button.
It's probably a question for the Samsung TV integration devs but I haven't found it looking through their docs.
Thanks!
Ahhh, got it! Even if i got it wrong before, a cool feature was born anyway :v
Spotify, Netflix and Youtube are currently the only sources defined in the code here. So, without customizing, you can only use these. The good news are that customizing is (most of the time) very easy.
In order to add a button for any source that is not defined in the code, you need to define it as custom source at the card config:
custom_sources:
<button_name>:
icon: <icon_name>
source: <app_id>
This is the way to go if you're using Samsung with ha-samsungtv-smart, like me. In your case, you also need to define an icon and get the app_id for HBO Max And i hope you're using Samsung, because i got the app_id from mine and it's easier to make it work using this ointegration.
If you're not using Samsung, your custom button should have a service calling the right method on the integration you use:
custom_sources:
<button_name>:
icon: <icon_name>
service: <domain>.<service>
service_data:
<params>
I managed to make a HBO Max button for my Samsung TV with some settings into the integration and this config into the card config:
apps_row:
- netflix
- youtube
- spotify
- hbomax
custom_sources:
hbomax:
icon: hbo
source: HBO Max
custom_icons:
hbo: >- # from SimpleIcons
M7.042 16.896H4.414v-3.754H2.708v3.754H.01L0
7.22h2.708v3.6h1.706v-3.6h2.628zm12.043.046C21.795 16.94 24 14.689 24
11.978a4.89 4.89 0 0 0-4.915-4.92c-2.707-.002-4.09 1.991-4.432
2.795.003-1.207-1.187-2.632-2.58-2.634H7.59v9.674l4.181.001c1.686 0
2.886-1.46 2.888-2.713.385.788 1.72 2.762 4.427 2.76zm-7.665-3.936c.387 0
.692.382.692.817 0 .435-.305.817-.692.817h-1.33v-1.634zm.005-3.633c.387 0
.692.382.692.817 0 .436-.305.818-.692.818h-1.33V9.373zm1.77
2.607c.305-.039.813-.387.992-.61-.063.276-.068 1.074.006
1.35-.204-.314-.688-.701-.998-.74zm3.43 0a2.462 2.462 0 1 1 4.924 0 2.462
2.462 0 0 1-4.925 0zm2.462 1.936a1.936 1.936 0 1 0 0-3.872 1.936 1.936 0 0 0
0 3.872Z
In the integration settings you need to add HBO Max manually into the source list using the app_id. I did it in the configuration.yaml:
samsungtv_smart:
- host: <ip_of_tv>
app_list: '{"Netflix": "org.tizen.netflix-app", "YouTube": "111299001912", "Spotify": "3201606009684", "HBO Max": "cj37Ni3qXM.HBONow"}'
I got the HBO Max app_id in Developer Tools, checking the attributes of the tv entity while HBO Max was open on the tv. I manually set app_list but i read that if you don't set it, the integration will try to load all available apps at startup. It didn't work for me, that's why i set manually. Feel free to test if the button already works without changing configuration.yaml ( if you actually don't set anything manually)
If even after changing configuration.yaml (and restarting Home Assistant) the button doesn't work, you might try to get the app_id by yourself in Developer Tools (i don't know if the app_ids are always the same on all models)
Please tell me if it works :)
Hi,
while trying to add the same (HBO Max) or even Disney+ or any other app (for example Plex) I noticed that on my TV at least, clicking on any app icon will cause the TV to shutdown instead of openning the app itself, every other buttom works flawless except for the apps (at least the 3 default ones). Is there any debug string or anything I could look at to debug this further?
@usernein it works! With little differences from your setup: 1) I didn't have to add HBO Max manually into my configuration.yaml - I don't have it there anymore, it's all done via GUI. I can call the HBO Max app without this 2) for some reason, the icon didn't appear with your card code (config). What fixed it for me was naming the icon "hbomax" as well like this:
source_row:
- return
- home
- netflix
- youtube
- hbomax
custom_sources:
hbomax:
icon: hbomax
source: HBO Max
custom_icons:
hbomax: >-
M7.042 16.896H4.414v-3.754H2.708v3.754H.01L0
7.22h2.708v3.6h1.706v-3.6h2.628zm12.043.046C21.795 16.94 24 14.689 24
11.978a4.89 4.89 0 0 0-4.915-4.92c-2.707-.002-4.09 1.991-4.432
2.795.003-1.207-1.187-2.632-2.58-2.634H7.59v9.674l4.181.001c1.686 0
2.886-1.46 2.888-2.713.385.788 1.72 2.762 4.427 2.76zm-7.665-3.936c.387 0
.692.382.692.817 0 .435-.305.817-.692.817h-1.33v-1.634zm.005-3.633c.387 0
.692.382.692.817 0 .436-.305.818-.692.818h-1.33V9.373zm1.77
2.607c.305-.039.813-.387.992-.61-.063.276-.068 1.074.006
1.35-.204-.314-.688-.701-.998-.74zm3.43 0a2.462 2.462 0 1 1 4.924 0 2.462
2.462 0 0 1-4.925 0zm2.462 1.936a1.936 1.936 0 1 0 0-3.872 1.936 1.936 0 0 0
0 3.872Z
(I have no idea why Github pastes it like this, I DID use the code tag). The icon didn't appear when it was called just "hbo" in both places.
This said, it all works now as expected! If this helps, I have the 2018 NU8000 Samsung TV.``
Funny for me it was just copy & paste the code shared by @usernein and quick server restart, as soon it was up the HBO icon was showing although I get the same issue as the other apps, as soon I click on it, the TV goes off, mine´s a 2021 QN900A
@tretabyte: clicking on any app icon will cause the TV to shutdown instead of openning the app itself
It also happened to me yesterday while testing it, but i ignored because it happened only once. After it, the buttons worked normally. I have no clue on why it happened, but i will investigate
@Stooovie: I can call the HBO Max app without this
That's nice! I did know it would work because i need to set it manually in the yaml (otherwise, the YouTube button won't work)
@Stooovie: for some reason, the icon didn't appear with your card code (config). What fixed it for me was naming the icon "hbomax" as well like this:
It's a bug that was fixed at v0.4.2 (read the release notes) Make sure you have the card at the last version, it should work
@Stooovie: (I have no idea why Github pastes it like this, I DID use the code tag)
Use three backticks and set the formattting to yaml, like this:
```yaml your code here ```
I updated your comment using this format
@tretabyte hmm, I started to have the same issue now - tapping any of the app icons just turns off the TV. That didn't happen with the older versions of this addon.
I downgraded to 0.4.2 and it works as expected. In 0.5.0, any app button turns off the TV.
Let's continue at #10
I tried "HBO Max", "hbomax" and various other permutations, to no avail. Any idea how to set up a HBO Max button? Thanks!
Thanks for the fantastic addon card BTW!