Current beahviour of the button navigates to air conditoner page but you can change it with editing tap_action part. For example this code directly turns on and off the airconditioner instead of navigating to the page.
Working on my dashboard and I can’t seem to get the person card to show a mdi:car when the status is state is set to driving (or Driving). It shows the Home badge when the state is set to driving. all other badges seem to reference zones that I have configured in home assistant. Any way to get the badge to show a car when the person is driving?
Thanks, been having a play with this today and it seems to work but only if I hold the button… if I just click it the animation stops playing as soon as the mouse button is released.
Is there any way to force it to finish up the animation ?
Here is what I have so far;
- type: custom:mushroom-template-card
primary: ''
secondary: Leave
icon: mdi:hand-wave-outline
layout: vertical
icon_color: green
tap_action:
action: call-service
service: scene.turn_on
service_data:
entity_id: scene.leave
card_mod:
style: |
ha-card:active mushroom-shape-icon {
display: flex;
animation: wave 2.5s;
}
@keyframes wave {
0% { transform: rotate( 0.0deg); }
10% { transform: rotate(14.0deg); } /* The following five values can be played with to make the waving more or less extreme */
20% { transform: rotate(-8.0deg); }
30% { transform: rotate(14.0deg); }
40% { transform: rotate(-4.0deg); }
50% { transform: rotate(10.0deg); }
60% { transform: rotate( 0.0deg); } /* Reset for the last half to pause */
100% { transform: rotate( 0.0deg); }
}
ha-card {
background: var(--card-background-color);
box-shadow: 0 0 4px 0px lightgrey !important;
width: auto;
border-radius: 10px;
margin-bottom: 2px;
}
Also, I seem to be having issues with some animations since the above applies it to the entire shape not just the icon… so when I try to do clipping I get white blank parts… can’t for the life of me figure out the right syntax though that will still allow me to use ha-card:active and the normal ha-card styling, along with selecting the ha-icon too.
I had a similar problem when I was setting up my person cards, although I used the template card. The issue I had was that I couldn’t compare some attributes from Life360 tracking. They just simply wouldn’t work. Even though in your example, you clearly have “Driving” shown, I couldn’t compare that against any state_attr’s.
I resolved the issue by setting up template senors and comparing those, that then worked ie:
- platform: template
sensors:
my_mobile_charging:
friendly_name: "My Mobile Charging State"
value_template: "{{ state_attr('device_tracker.me', 'battery_charging') }}"
Is it possible for the primary text of a card to be 2 lines?
I’m trying to make “Downstairs Bathroom” display as:
Downstairs
Bathroom
It’s too long on a single line and ends up overlapping with my chip cards. I don’t want to put Bathroom as secondary because I’m displaying other information as secondary.
EDIT: Found it
card_mod:
style:
mushroom-state-info$: |
.primary {
white-space: normal !important;
}
Absolutely amazing, this has got to be your best media player card yet!! Four questions:
The only downside is that, when the media player is turned off, it is a giant empty card. You could resize it to normal when the state is off (like the Apple TV in screenshot) but then the layout could shift too much on a tablet layout. Maybe the best is to not show the card at all in that case? Any ideas?
For some reason the blurred background goes beyond the rounded corners of the card? It’s almost not noticeable though. See screenshot from iPad.
Left/right margins seem to be unequal? Possibly because my whole vertical stack has a smaller width?
On my Android phone, the album art does not show and the whole ha-card:before part collapses to a few pixels height The album art does show correctly in your other media player cards.
You could put it in a conditional so that it doesn’t show when off. A better solution might be to have a generic image when the player is off. If you find any suitable ones let me know and I can add it.
Yes, I have seen that, but @theandouz was not seeing the same behaviour on his. It may depend on your version of Safari or iOS. Perhaps others could comment and we can see if there is a pattern.
Does it correct if you widen the column? The aspect-ratio should adjust correctly, perhaps another iOS quirk. You could try playing with margin: 4px 4px 16px; to see if you can correct.
The card we were testing included the transform: translate3d(0,0,0); -webkit-transform: translate3d(0,0,0); applied to the ha-card as well and that seems to fix the border issue.
This looks like this, i love this view, however i really want to grid this so i can have it two in width. Tried variations with grid etc, but it wont work as i want, any tips?