my case is> the state of my entity could be a very long string like you see in my foto, and i dont control that , i just want to something happen if the string “cozinha” is inside of that long string.
But i can,t find the anwser for that so i am seeing now how to do it with mushroom buttons, there i can use the jinja2 template.
Does anyone have any great ideas on how to achieve this.
I have a button that has a timer template on it as a custom_field and want to basically draw the custom_field OVER the icon and turn the icon off when the state is on
eg:
state_on:
icon: off
custom field: on
state_off:
icon: on
custom field: off
I have tried to trick the card by styling both of them using things like transparent colors on both and realize that transparency IS NOT REALLY TRANSPARENT (if the custom field text and background color is set to transparent it blanks out the icon and you cannot see the icon thru the text)
I have also tried (what I think is) EVERY combination of show_icon: and show_label: (with the idea that the template could go in the label if-need-be
state:
- value: 'on'
# show_icon: false
# show_custom_field: true
styles:
custom_fields:
notification:
# show_notification (code/template)
- color: black
- background_color: transparent # can also be aquamarine if needed
card:
- background-color: aquamarine
icon:
- color: transparent
- show_icon: false
- value: 'off'
# show_icon: true
# show_custom_field: false
styles:
custom_fields:
notification:
# hide_notification (code/template
- color: transparent
- background_color: transparent
card:
- background-color: blue
icon:
- color: red
The reason Im doing this is I have a 6x6 grid of buttons that can select any of 36 timers in a custom:vertical-stack-in card and I dont have the real estate to do it any other way as there will be 20 of these cards on one page on a dashboard
After update to 2023.5 I´ve noticed that lock icon when custom:button-card has enabled lock is visible through popup or blurred background while popup.
I am new to this card and could a little help configuring a custom field.
I have a horizontal stack with 4 cards. The first two cards are for the washer and dryer, I want to show the countdown time at the bottom of the card. I have this working in the below code but the text for the countdown timer is causing the buttons to overlap. How would I go about removing that text entirely?
@kajmaj, I just updated to 2023.5 this week and started noticing the same thing. I also have a whole button-card that I created doing it too, but only one of the several I have on the dashboard are showing over the popup. Very strange.
I haven’t figured out what is going on yet. If anyone has seen any discussion on this issue elsewhere please reply with a link.
I did some digging with the browser debug window and determined that there is a crucial css variable missing in my theme to ensure a proper z-index of the dialog.
I added this to my theme:
dialog-z-index: 100
mdc-dialog-z-index: 100
The first one is what did it, but both were missing.
The error message is telling you, that the sensor is not ready at the time it is setup in the system. Meaning, the sensor is not ready yet.
That’s why it works in the template editor. At that time the values from your weather provider are available, so the sensor works correctly. And on a second note, it depends on how you call the sensor. There is a difference between states['xyz'].attributes... and state_attr. See here (especially the “warning section”):
It is very simple. Three separate cards: two for lights in two rooms, one for windows and doors.
However, I have one problem. Once in a while the cards do not load on my phone. When I start HA, the cards are not there, or there is only 1 of 3 or 2 of 3. This happens when I haven’t opened the app on my phone for a long time (a few hours, a day). Switching to a different view in the same dashboard and then back does not help. Switching to another dashboard and then back helps. However, I would like to eliminate this problem. Has anyone encountered this or have any ideas? I can’t find anything related to these events in the logs.
/edit
I’ve now tested on the PC and noticed that the same thing happens in the browser after refreshing the dashboard page - I press F5 and the screenshot tabs disappear. Does anyone have this problem?
It takes the value edited on “turn: rotate(180deg)” of the first card, and in the following cards it keeps the same value even though it is different.
What is not clear to me is that the “origin: rotate(0deg)” value that I use to rotate the card instead in the first one is not kept in the second one which is precisely “origin: rotate(60deg)”
Is there a way without creating a keyframes for every single card?
I am trying to figure out some custom fields and how to alter some existing code that I am using in my own dashboard. I am following Mattias_Persson’s code found here.
I am trying to change the person card to show colors similar to what I have been able to do on other cards with one difference. On some cards I am using for input_select entities I have different colored circles for different notifications. I am trying to show a green circle for the home zone, yellow for any other zone, and red for away.
Unfortunately, following Mattias’s code I only get an on or off based and the state_on variable. But I can’t figure out how to add a third option. Additionally, I would like to replace the time in the circle with the icon for the zone that each person is in or the away icon. I have tried countless ways to get this to work and have not been able to get to what I want. Any help would be greatly appreciated.