Nice!! Def want my HA to look like that. I haven’t fixed a nice UI even after using HA for 1.5 years
Nice! I have that as well (I used Bob_NL’s Radio as an example for the codes), but I combined it with multiple conditional mini media player cards inside a vertical stack-in-card (depending on what speaker is on) and use it as a popup card for Spotify on my Lovelace view (Also wrapped all the mini cards inside a swipe card so I can swipe media players in case different sources are on). Pressing the Spotify button (added a button-card inside the vertical stack-in-card between the dropdown menu and mini media player cards) starts the script.
Hey, are you able to share your final config for this, looks awesome and would love to use it myself!
I really like it, do you maybe have the popup card code yaml also? I can’t get the input selectors in a nice popup card style like yours… Thanks a lot @tomerbs!
This has been thought out really nice. Are you willing to share the gui-yaml code of the popup?
Thanks a lot!
@martheijnen and @mitch Hi, thank you! It’s impossibe for me to share that for the time being. I have split my configuration in to multiple yaml files (like more than 40 files). I don’t have the time to search them all an put them in a file or to share my entire setup. I can share the code of what you see there, but you’ll be missing a lot of info and files. It’ll give you an idea how I created that and should help you on your way though!
card:
layout: vertical
type: 'custom:layout-card'
column_width: 96%
cards:
- content: |
# Maak je keuzes en tik op het Spotify icoontje.
style: !include /config/templates/smartphone/markdown-sub-style.yaml
type: markdown
- cards:
- entities:
- entity: input_select.spotify_playlist
- entity: input_select.google_cast
type: entities
style: |
ha-card {
--paper-card-background-color: var(--background-color) !important;
box-shadow: none !important;
}
- deep_press: true
entity: media_player.sony_cast
hold_action:
action: more-info
haptic: heavy
icon: 'mdi:spotify'
label: Spotify
name: Tik hier om te starten!
aspect_ratio: 4/1
size: 100%
show_icon: true
show_label: false
show_last_changed: false
show_name: false
show_state: false
state:
styles:
card:
- font-size: 18px
- background-color: var(--background-color)
name:
- font-weight: bold
- font-family: Helvetica
label:
- font-size: 10px
- filter: opacity(0%)
tap_action:
action: call-service
haptic: medium
service: script.turn_on
service_data:
entity_id: script.spotify
type: 'custom:button-card'
- !include /config/templates/mediaplayers/card_sony_cast.yaml
mode: vertical
keep:
background: true
border_radius: false
margin: false
outer_padding: false
type: 'custom:stack-in-card'
deviceID:
- this
style:
align-items: center
background: var(--background-popcard)
icon: 'mdi:apple'
justify-content: center
width: 400px
box-shadow: none
title: Spotify
And if you have multiple media players you want to swipe between just wrap those cards inside a swiper-card (install the plugin first through HACS). I removed that from the code above, because it would be confusing (since I also deleted other media players to showcase the code more clearly)
- cards:
- INSERT CARDS HERE
- INSERT CARDS HERE
- INSERT CARDS HERE
parameters:
spaceBetween: 20
pagination:
type: bullets
type: 'custom:swipe-card'
Make sure to view the post of Rob_NL I mentioned above to have the menu/script actually functional. I created my own script using his example: Chromecast Radio with station and player selection
Thanks, I managed to get the script working but now want the simple entity card i have in my ‘homekit style’ layout. It’s not that easy to get that done :’)
thanks, hope to can get something of your code working
Ah ok, yeah I don’t use the Homekit Syle card (you mean the one from DBuit right?)
Yes! correct. With my own additions onto it ofc
Yes, I’m not sure how that one works. I like his work, but don’t want to be dependable on someone elses work to create my interface. That’s why I decided to not use his and create my own interface. I do use his popup sliders though. They work pretty good, though I want to create my own version later on.
Wish I had the same experience in yaml as you have. Did you share your config somewhere to just dig in and learn ?
I started using Home Assistant since last december (so just over 7 months ago). I switched from Homey (smart home platform) after using that for around 1,5 years. I started using YAML mode like 3-4 months ago. I am by no means a programmer (I studied marketing and am working at communications/marketing). I just try a lot and figure out as I go.
I don’t have my config published right now. I might do that down the road, but I’d need to clean a lot up (have a lot of personal info and comments everywhere to help me code). Right now I don’t have the time to publish that unfortunately. There are a lot of other people who have their complete UI’s programmable, like Dwaine and Jimmy.
Hey, I’ve started using spotcast and think its excellent! I’ve been able to set up some easy one click buttons in HA that are great for my family to use to get music into the room they’re in!
However, I’m noticing a small problem in that it randomly stops playing back after approx ~30minutes. One click of the button gets it going again, but as a result we end up hearing a lot of the same tracks even with the “random” songs set to true.
Just wondering if I have done something incorrectly?
I have this configured on a template switch.
spotcast_everywhere:
friendly_name: "Everywhere Music"
value_template: "{{ is_state('media_player.everywhere', 'playing')}}"
turn_on:
- service: spotcast.start
data:
device_name: Everywhere
random_song: true
uri: 'spotify:playlist:xxx'
turn_off:
- service: media_player.turn_off
entity_id: media_player.everywhere
Thanks in advance for any assistance.
It’s an hour (it might feel like 30 minutes because you started the service earlier, then stopped and played again). This has to do with the tokens. As far as I am aware there is no way around this at the moment.
Hi!
I’m trying to upgrade from 0.111.4 to the latest version but when I run the ‘Check Home Assistant Configuration’ tool from Supervisor to check my config against the latest version, I get the following incompatibility:
Failed config
General Errors:
- Component error: spotcast - No module named ‘spotipy’
The Spotcast component is working flawlessly in 0.111.4 so I’m not really sure why I get that response when checking against the new version??
Any assistance will be greatly appreciated!
Weird. Uninstall spotcast and upgrade HA and then install latest
I saw that 0.112 had a different way to store cast devices
Now it is solved with spotcast 3.3.4
Ok, but i still have 0.111… is this a problem?
Don’t know. Try 3.3.4