Thanks man. I have found what my problem is. In my case, i dont use the width of the card exactly like him. Mine is with 10%, so, the overlay propriety on the button_card_templates.yaml must be like that:
overlay:
[background:
"[[[ return entity.attributes.entity_picture == null ? 'backdrop-filter: blur(4px) brightness(60%)' : 'backdrop-filter: blur(4px) brightness(60%)'; ]]]",
background-size: cover, z-index: 0, top: 8vw, left: 0%, width: 100%, opacity: 1, position: absolute]
The top propriety must be 8vw.
soylant
(Birger Jensen)
January 16, 2021, 10:55pm
905
hi where do I find this icon icon: custom:roborock-vacuum??
Hi
That is where I’m trying to configure it. I think it’s more a mistake in how to do it.
Larey
(Larey)
January 17, 2021, 12:26pm
907
hello can anyone help me with any problem. If I put a markdown card in my sidebar it works for a while. When I reload my ui, I get an error here with the message:
“Must specify card_type, element_type or row_type”
my code is:
title: Thuis
views:
- panel: true
path: default_view
cards:
- type: picture-elements
image: local/background.png
elements:
# markdown fix
- type: custom:hui-element
card-type: markdown
style: {opacity: 0}
content: preload
##########################################################################
# #
# * SIDEBAR * #
# #
##########################################################################
- type: image
image: local/sidebar.png
tap_action:
action: none
hold_action:
action: none
style:
{top: 49.24%, left: 10.6%, width: 21.5%, pointer-events: none, border-right: '1.5px solid rgba(58,69,73,0.2)'}
- type: custom:hui-markdown-card
style:
{top: 20%, left: 11%, font-size: 0.65vw}
content: >
Volgende afval dat wordt opgehaald over **<font color=grey>{{states('sensor.afvalwijzer_next_in_days')}}</font>** dag(en)<br>
Afval dat opgehaald wordt: **<font color=grey>{{states('sensor.afvalwijzer_next_item')}}**
sergio_pt
(Sergio_PT)
January 17, 2021, 6:09pm
908
Im having the same issue tying to scale the graph
I’ve tried many things even with card-mod but no success.
If you get to something please let me know or share here
Hi @Mattias_Persson , how did you get your animated icons, you made by yourself? They are amazing, i want to do some by myself. Nice job on the project btw.
If theres any tutorial for the icons i’ll be happy to see.
Ok did I miss the install instructions?
pasberg
(Peter)
January 19, 2021, 4:15pm
911
Hi @Mattias_Persson et al,
I have a question - why do you call input_boolean.turn_on
in the turn_off
service in the switch template for (for instance) playstation_4
in the snippet below. Shouldn’t be input_boolean.turn_off
? I don’t understand…
playstation_4:
friendly_name: Playstation
icon_template: mdi:sony-playstation
value_template: "{{ is_state('binary_sensor.playstation_4', 'on') }}"
turn_on:
- service: input_boolean.turn_on
entity_id: input_boolean.playstation_4
- service: media_player.turn_on
entity_id: media_player.playstation_4
turn_off:
- service: input_boolean.turn_on
entity_id: input_boolean.playstation_4
- service: media_player.turn_off
entity_id: media_player.playstation_4
Thanks!
I bet you’ll figure it out once you spend a little more time with HA
Entity state is undefined? Does you entity actually exist?
Post code and I’ll have a look
@andrew47 @johansvensson911
Does the slider work as expected without my styles? Otherwise open an issue over at that repo. Some css is browser specific.
Have you looked at line 92, column 65?
Post that line.
Henke:
Just wondering about the colors (active and non-active) of the svg icons inside the button cards.
I saw in a previous answer that the color is defined inside themes.yaml like this: paper-item-icon-active-color: ‘#3182b7 ’ (which is the light blue color), but I can’t find where the darker color (which I prefer) is defined.
I don’t remember… isn’t that just the “ordinary” icons?
You can set colors yourself
icon_home:
[top: 10.5%, left: 10.1%, width: 2.9vw, position: absolute,
fill: "[[[ return entity.state === 'on' ? '#c7983e' : '#9da0a2'; ]]]"]
1 Like
You can’t use jinja {{ states }} in button card, you have to use javascript.
[[[ return states['sensor.velux_sensor_temperature'].state; ]]]
If you strip everything down it’s basically just this
title: Home
views:
- panel: true
path: default_view
cards:
- type: picture-elements
image: /local/background.png
elements:
- type: custom:button-card
entity: light.skrivbord
name: Hello
style:
top: 50%
left: 50%
width: 10%
- type: icon
icon: mdi:information
title: World
style:
top: 20%
left: 50%
color: rgb(255, 255, 255)
--mdc-icon-size: 4vw
1 Like
greghesp
(Greg Hesp)
January 19, 2021, 6:01pm
920
Yup did exactly this, just not sure why the fonts are all the wrong scale.
the CSS variable --button-card-light-color
will contain the current light color
the CSS variable --button-card-light-color-no-temperature
will contain the current light without the temperature
*icon_hue_styles
It’s yaml anchors. You can think of it as:
& = copy
* = paste
I think you’re getting undefined alias because it has nothing to copy from
#button-card icon
icon_spot: &icon_spot >
[[[ const state = entity.state === 'on' ? 'animate_on' : 'animate_off';
return `<svg viewBox="0 0 50 50"><style>@keyframes animate_on{0%{tra...
#another button with same icon
icon_spot: *icon_spot
card_type:
not card-type: