But I still need to click over the button in order to get video streaming …
I still have the card grey out …
By the way the camera that I’m traying is a dual lens, and I want if possible when I click over the one of the “buttons” Open the 2 buttons streaming at the same time to view the stream like a panoramic view, is this possible ?
Hi there,
is it possible to set the icon color from climate entity with “preset_mode” ?
My climate has two preset_modes: ‘comfort’ and ‘eco’ both are with state ‘heat’ so there is no difference in the color whether comfort or eco.
ButtonCardJSTemplateError: SyntaxError: missing ( before condition in ‘if is_state_attr(‘climate.heizung_buero’, ‘preset_mode’, ‘comfort’) return ‘orange’; if is_stat…’
i guess that depends on where you put it. I’ve got code exactly like that in my ui-lovelace.yaml file. I am using it within the context of custom:button-card templates though.
I am working based off your design, and making a lot of progress. I am loving it. Question is, what is the best way to change the layout for a phone vs desktop? Should I go down the path of having a layout-card inside the container template instead of the grid and columns as you have originally defined? So I can have 4 columns on a desktop, and 2 on a phone for example for each of the containers?
Thoughts? I am going to try it out, but wondering in parallel if that’s the best approach.
What I did was to go with two columns of four buttons each which shows up nicely on a phone. If you don’t wrap that in a single column, then it would be responsive to more width (as on a tablet) and you would have three or even four columns across a single line.
The other option, which is a lot more work, would be to specify which layouts are used for each device and create a separate phone and laptop layout. I’m not really fond of that approach. It involves too much redundancy and thus having to make changes in two (or more) places.
I couldn’t figure out how to do this with just the custom:button-card, but I was able to do it by using the decluttering-card: GitHub - custom-cards/decluttering-card
Here’s one of my definitions using the decluttering card. As you can see, entity IDs are used as variables, which allows the one definition to be used in multiple actual cards.
I am still using the container template, and added the code to my card. Next step is moving the code to the button-card template of container…not sure how to go about it yet, but will learn!
You can notice some of my cards are not “responsive” and the alarm card on the side does not look too good, etc. Those are standard cards, so I need to dig into it.
Let me know if there is a better way of doing it, but it looks good on my phone and when I resize on the PC, but I am sure there are cases I am missing and will identify with time.
Here is the code for it. You need to change the max-width under the mediaquery for your own layout cutoff.
Trying to combine a few on/off lights into a single button, and came across the button-entity-row card. Has anyone tried to use this into a button-card? I am trying to maintain the look and feel by using aspect_ratio 1/1.1 buttons throughout, and embedding the button-entity-row in it.
I got the code to appear, so step 1, but can’t seem to get it right as a button-card. Any insights?
This is what the code looks like now, without the button-card
- type: entities
title: Toggle Buttons
show_header_toggle: false
aspect_ration: 1/1.1
entities:
## USE THIS CONFIG TO HAVE IT MATCH YOUR THEME ##
- type: custom:toggle-control-button-row
name: Her Closet
entity: light.home_master_bath_her_closet_light
customTheme: false
and this is how it shows. Expected, given the code, but need to contain it into the button-card. I plan on having 3 or so rows.
Hi all. I have a question about the problem which I can’t find the right answer.
On my lovelace dashboard I have custom:button-card to control my 3DPrinter (octoprint). I have a webcam set up as well so I can see and check the progress of the print. To do that, I use a picture-elements card with the feed from the webcam.
And here is my problem: what I’m trying achieve is to display either a static image or live web-cam feed based on a sensors value (sensor.octoprint_current_state).
In the other words, if the Octoprint state is “unavailable”, I would like to display a printer’s logo (static image) instead of the feed from the web-cam. And as soon as the Octoprint is enabled and become “Operational” I want to switch to live web-cam feed.