That is how lovelace works. If you have 1 card on the line it will take the full width. 2 will take each half etc…
If you want to insert white space cards you can use that config in a horizontal-stack:
I have now read almost all the thread but not found any solution.
I am looking to embed in a single button multiple icons.
Button represents a motion and switch controlled light with a quite complicated logic behind.
I need to represent the state of the light (on off) at the center . So far pretty normal
In lower left corner I would like to represent the status of the connected motion sensor. Ideally with a graphical progress indicator. The progress is given by a node red timeout node and is available as a sensor in Home Assistant.
in lower right I I would like to represent the status of the connected switch. Ideally with a graphical progress indicator. The progress is given by a node red timeout node and is available as a sensor in Home Assistant.
Upper right icon with current brightness in the room (motion sensor has a luminance sensor too and light can trigger based on configurable luminance threshold, think about Hue sensor setup)
Holding on the button would popup a window with some related parameters (timeframe, weekdays to use, light sensor threshold…)
As said I would have ideally done it in one button but I am close to giving up and having this in a 3x3 Horizontal & vertical stack.
Any clue / suggestion?
I was thinking of using a 3x3 grid and a few icon items on it . First trouble is that they are linked to different entities. Second that they should be dynamically updated
Yes I was going along the path of browser mod for popups.
So custom_fields is the other track.
I will search for it in the thread.
Can You point me to some link?
By default the lock is visible in the upper-right corner. If you want to move the position of the lock to for example the bottom-right corner you can use this code:
I have a card with a graph. When its placed on the end of other cards everything is fine. But when it’s placed before (horizontal stack) another card it overlaps that card:
Fine:
Overlaped:
Is there something wrong with my card config? Thanks
Anyone have an idea how I can get the dynamic color from the entity?
The attribute.rgb_color is working for the icon I use to update the strike color dynamically. But I want to try to set the card background dynamic when on. But I can not get the color. Hope someone can help.
Is anything wrong with the label_template option? It doesnt work in any case for me. Here is an example. Maybe someone of you can test it in another setup. Thx!
It’s just label, not label_template. Also please check the documentation on github, this has been deprecated for quite some time now a’d the template format has changed.
frontend_latest/app.267b6bce.js:846:247005 SecurityError: Attempt to use history.pushState() more than 100 times per 30 seconds
and
local/lovelace/resources/button-card/button-card.js?v=3.4.0:898:92 SecurityError: Attempt to use history.pushState() more than 100 times per 30 seconds
2020-10-28 01:16:14 ERROR (MainThread) [frontend.js.latest.202010213] https://redacted/local/lovelace/resources/button-card/button-card.js?v=3.4.0:898:92 SecurityError: Attempt to use history.pushState() more than 100 times per 30 seconds
2020-10-28 01:16:17 ERROR (MainThread) [frontend.js.latest.202010213] https://redacted/local/lovelace/resources/button-card/button-card.js?v=3.4.0:898:92 SecurityError: Attempt to use history.pushState() more than 100 times per 30 seconds
2020-10-28 01:16:18 ERROR (MainThread) [frontend.js.latest.202010213] https://redacted/local/lovelace/resources/button-card/button-card.js?v=3.4.0:898:92 SecurityError: Attempt to use history.pushState() more than 100 times per 30 seconds
2020-10-28 01:16:21 ERROR (MainThread) [frontend.js.latest.202010213] https://redacted/local/lovelace/resources/button-card/button-card.js?v=3.4.0:898:92 SecurityError: Attempt to use history.pushState() more than 100 times per 30 seconds
and when it happens it floods…(some 600-1000 times)
not really much else to go on (didnt set anything to debug, if that’s even possible)
how can be find out which button is causing that…
I have one suspect, though, if you think of it, it behaves as expected. I ll explain.
this is a counter
- type: custom:button-card
entity: group.all_inside_lights
template: button_title_counter
triggers_update: input_boolean.run_lights_summary
label: >
[[[
var i;
var entities = entity.attributes.entity_id;
var count = 0;
for (i = 0; i < entities.length; i++) {
var state = states[entities[i]].state;
if (state == 'on') {count += 1;}
}
if (count == entities.length) return 'All ' + entities.length + ' lights on';
if (count == 0) return 'No lights on';
return 'Lights on: ' + count + ' of ' + entities.length;
]]]
that counted the individual lights in the entity, group.all_inside_lights.
I have changed that group, to contain other groups with lights, so it now only counts those groups, if they are ‘on’. I dont see any other errors the JS is incorrect, so maybe this isnt the culprit after all. Havrmnt change any of my JS in the buttons though.
Hope you recognize the error and could explain what’s happening.
thanks
The only way this is happening is when you call a “navigate” action and it loops indefinitely. I’d be looking into your menu if there are no issues with it (I’ll look on my side too if the code doesn’t do something weird but it’s a pretty standard part)