#frontend-archived
1 messages · Page 46 of 1
states['pyscript.amp1_standby'] is the state object
states['pyscript.amp1_standby'].state is the value of the state in the state object
it's not a full state object either
All states are strings within HA objects
FYI when JS shows [object Object] that means you aren't returning a simple type
i.e. you're returning an object, list, tuple, dictionary, etc. Not a string, Number, boolean, etc
Ok. I wasn’t aware.Must be different than Jinga. Template developer too says it is Boolean
Right. Deduced that. In template, it’s just states("pyscript.amp1_standby"). In JS is seems to be states[“pyscript.amp1_standby"].state
I thought that states were simple data types and services were used for anything more complex. Did I get that wrong?
you're comparing Jinja (language) in home assistant to JS (language) in a custom card
FYI, in Jinja (Templates) states["pyscript.amp1_standby"] also gets you the state object
Nope even in jinja it is a string (calling the same object) but the editor tries to interpret the type
The JS in custom button card does not have a states() function.
Also, states in HA are always strings.
Right. It’s just an array to expose HA data. Guessing it contains some other data, or if would not be an object (last updated timestamp, etc?)
it's not an array, it's a method
what language do you normally develop in? I can draw a comparison
About a dozen. Mainly C#
[] in python & jinja is called "Getting an item". For arrays and lists, it will give you the indexed item if you provide a number. For dictionaries, it gets you the value for the ['key']
states() is equivalent to a public method
it's constructor is essentially string entity_id and it's returned value is string
it gets the state from the state object of the supplied entity_id
Ok. I assumed that under the hood it was just in a big array, so JavaScript didn’t have to do callbacks to HA from the client to get values.
it's not a big array, it's an object where calling it was overriden as well as getitem is overridden
Is it read-only in JS?
it's read only in Jinja, in JS it's whatever custom button card did to the object
My guess is that it's just a dictionary.
that's read only
Gotcha
have a problem with my Light counter. It counts all lights but I only want it to count the lights in my room. Also when the lights are on the Icon is gone. Can someone help me?
Post your code so others can see what you already have done and help you to fix it
I'll do
this is in the card
I added this in the templates
in configuration.yaml I added this
and I created this file
thats issue 1 fixed
{{ states.light
| rejectattr('attributes.entity_id', 'defined')
| selectattr('state', 'eq', 'on')
| selectattr('entity_id', 'in', area_entities('roomname'))
| list | count }}
So replace roonname with my own?
Yes
Don't think that line helps. The area should be with spaces within the quotes, iirc
area_entities() wants either an area_id or the name of the area. So, I have an area named “Living Room”. To get the entities, I use area_entities(‘Living Room’).
Ah, the second line filters out groups. If that is wanted, leave it as is
when i reboot the front end last-changed resets. What can i use so that when i reboot the front end i can still maintain lets say how long the door has been closed for
put this in Templates?
and also sensor.yaml?
I'll btw use codepile next time I'll share my codes/logs
You can’t. That attribute is controlled by the state engine.
That looks correct to me.
I think i should do the same in templates? it still doesn't work
You could do it through the UI as well.
is there a different attribute that I can use? Or would a custom sensor need to be made?
you mean like via developing tools?
The history_stats integration could work. There’s also the custom MeasureIt integration available in HACS as well.
thats where my templates are
Nope. Create a template sensor helper in Settings > Devices & Services > Helpers. Paste your template in there.
Cuz I put it in the template tab in the developing tools
No. That doesn’t accept YAML. You can test the template code though.
like this?
Yup!
nothing else to be added here?
Not for just a number template, no.
I didn't select device or device class
It’s not.
The sensor is immediately available after hit save.
That’s one benefit of using the UI for helpers.
Click on the sensor in helpers, click the ⚙️ icon and you can set the icon and area and labels.
I did change the code in templates. Will that affect?
not available
What do you mean not available?
when i click on the word lightning on my dashboard
I get this
Did you test the template in the template editor in dev tools?
im doing it now shows 0
I just tested it here and it showed 2, which is accurate. Do you have any lights on right now?
{{ states.light
| rejectattr('attributes.entity_id', 'defined')
| selectattr('state', 'eq', 'on')
| selectattr('entity_id', 'in', area_entities('roomname'))
| list | count }}
This is the template you are using?
And you're sure you are using the correct area name?
I just tested it with my area "Living Room" and it returned 2, so I don't think it's the template that is the issue.
Did you remove the template from YAML config and reload HA?
There ya go.
Remove that and reload HA.
I'm going to bed now. Ill do this tommorow
you too
Hello
I've create a pressure button that changes the it's background color when it's pressed.
But I need a second action to activate the local_conditional_card.
Is there a way I can trigger the second action from a script?
Or may be there's a better way I don't know about
Here is the code
https://pastecode.io/s/b0wapibb
Can anyone help?
Thanks
Hi can anyone please tell me why my tablet that is in fully kiosk browser suddenly won’t let me play media from automations from it? It displays the dashboard from home assistant
Please tag my name if you have an answer so I get the notification 😅
Anyone?
Does anyone know if you can send actionable buttons using Matrix?
Now it works! I'm gonna create a backup right away!
Hi, i cant get the layout tab to show up on any of my cards
I have setup a Sections dashboard with version 2024.7.2
Can someone help me?
Try clearing your cache and/or an incognito tab.
That was it. Thanks!
Another question.
If i use a tile or entity card the remaining time of my timer doesnt update in real time.
Only if i use a entities card the time remaining update
Is this a known problem or am i doing something wrong?
Looks like a bug
It doesn't update in real time because it's just showing the attribute value, which also doesn't update in real time.
Only entitites card currently has the magic logic to render realtime. I believe an enhancement is coming to tile card though to add this in the future.
Thanks for the info!
You could also use something like this: https://github.com/rianadon/timer-bar-card I use it and it works well and updates in real time.
Very neat. Thanks so much!
(I have already removed the / at the end of the files)
Obviously you haven't
i did it
And image: is still wrong.
And indentation is totally off
Make sure you are using proper image file names and paths.
here is going
and when i add the second part of the code it gives this error
Yes... bad indentation
so?
yes but the first one works, the last one doesn't, I would like to understand how to fix the last one
The first one has correct indentation, the others don't
The error message already tells you, where to start
so what's wrong?
AND HOW CAN I FIX THIS SPACE?
With space
Likely another indentation error
fixed
Hi, maybe this question is more for here instead.. I have certain entities via an integration that show a human readable value when the entity is shown in the card, but their actual value in the state is different. Example: state value is: washer_substate_washing while if you add the entity to an entity card, you see 'Wash'. Where are these defined?
My guess would be in translations.
The integration should have a strings.json file that maps the raw state to an English readable string. For all other langugages, translations are handled via lokalize (external website).
thanks guys. found it.
it was under translations folder en.json
Can I replicate this for any entity I have? Can it be done for custom helpers for example?
otherwise I would have to do it in the template helper itself in a case statement I guess
As an end user you can't really do anything with the translation system.
A template would be the way to transform one state string into another.
last question.. from a template, can I grab the translated text for a state?
I believe there is a state_translated template function.
Yeah e.g. state_translated("sun.sun")
thank you sir
why isnt showing the image with the light on?
pls help
idk why isnt showing it, and there is a infinite loading wheel
My guess would be an indentation error
where?
in the state images to be precise
You will figure that out
how?
By guessing and trying
Hi guys, how can I change CSS of stuff using card mod?
@urban portal I converted your message into a file since it's above 15 lines :+1:
can anyone correct me, please?
thanks
post your code in dpaste so the formatting appears correctly to start. https://dpaste.org/
no problem, here
https://pastecode.io/s/zim1xupj
besides that action, I'd like to be able to change the local-conditional-card active
hey anyone have any idea why I can't set buttons to multiple column size, using bubble, I made a horizontal stack, with a pop up in a the vertical stack, with a few buttons after the pop up, but they all fill width
if I add them with column 2 outside the stack, it works as expected, side by side
but then they aren't part of the pop up...
bubble card to be more clear I mean
cards:
- type: custom:bubble-card
card_type: pop-up
hash: '#masterbedroom'
show_header: false
columns: 2
- type: custom:bubble-card
card_type: button
entity: light.bedroom_lamp_husband
sub_button: []
- type: custom:bubble-card
card_type: button
entity: light.master_bedroom_lamp_wife
layout_options:
grid_columns: 4
grid_rows: 3```
Finally completed these stunning cards for my dashboard. The colors are responsive to the temperature and will fade to blue, green, and red according to the current temperature. 😍
hi all - I'm trying to figure out the raw code to do a simple on/off toggle for my ecobee fan only. Any help appreciated. After spending the last month getting my lights where I wanted them, I've hit a snag as I've moved to the next entity.
I don’t know that this is possible. There is definitely no service call for the fan itself.
@stuck spire there definitely is as I used to have some schedules that were to turn on and off the fan
I just don't remember how I did that
looks like it's fan_mode (https://www.home-assistant.io/integrations/ecobee/). I only recently started doing my entire frontend with raw editor so lots of learning
But that’s part of vacation mode
maybe I did it with ecobee.set_fan_min_on_time and set it to indefinite
I've 100% done it, one of the reasons why I got into HA was how much I hate ecobee app 😉 including that you can set schedules for the fan
can't* (in the ecobee app, it's not possible to set a schedule for the fan, with HA, I was able to)
This might help get you started. https://community.home-assistant.io/t/need-help-on-scheduling-fan-automation-for-ecobee-3/339762/2
You literally just want to run the fan when the toggle is “on”
?
that's one of many things I want to accomplish. The most important as it's come from my wife 😉 She gets annoyed how complicated it is to start the fan when it's 2am and she's hot
what in the heck is this doing 'fan_mode: "{{ 'on' if now().minute == 0 else 'auto' }}"'
turning on fan at 0, but then the next minute making it auto?
I think this whole conversation should be in #automations-archived but ultimately I think you want to make a “helper” toggle. Put the toggle on your dashboard, but the toggle being “on” triggers the automation. The automation should set the minimum fan run time to 60m/h (assuming you don’t find a way to just straight up turn it on). May also be smart to have another automation to turn it back to your default minutes/hour when the toggle is moved to off, not sure if that’s actually needed though.
well I'm not looking to automate, looking for a frontend toggle 😉
You’d be getting that
ok I'll dig in, appreciate it. Probably 1 of 20 things I want to do with the ecobee
https://i.imgur.com/PF90PDS.png Any idea why theres scrollbars/arrows on bubble cards?
Do you have something sized smaller than the graphic allows?
shouldnt. happens on all dash types
Post the yaml in a dpaste link. Also what dashboard style are you using?
using sections
(which are supposedly fully supported)
it only happens with the card_type: button, the others work fine
Can you try removing the layout options for the card? And seeing if it’s fixed. This could be similar to what I was seeing with a stock card
Remove it from the yaml
same thing
https://i.imgur.com/yLtMOzG.png happens even on this giant ass dash
Yeah it’s like the background of the card is “smaller” than the slider graphic
Which is what was happening to me on other cards when using the layout editor in the ui (even if reverting to default layout value— having the yaml in place for the card broke it. Delete the code and it was fine. Weird). I haven’t used this card before so with out trying it on my system I don’t know what else to look at.
it adds that bit of yaml by deault automatically :/
can someone help me with a floorplan
A : too much
you have "state image", "hold action", and "tap action" and all should have _ in between the two words
fixed
and why now the entity makes a loading wheel (located behind the light bulb)
difficoult to see it in the screenshot
Are the missing _ fixed, too?
thanx
I have more lights to turn on in that room, what do I do? because if I put the right size to show the light on in the floorplan the entity occupies all the space
Creating light groups, which are switched simultanously or choose the most important ones
Define another action
I would like when I click on the light bulb, the light turns on without this screen, can you send me the code to do
and, if i click in other room, this light turn on anyway
No. You can figure that out yourself by reading the documentation:
https://www.home-assistant.io/dashboards/picture-elements/#image-element
I don't see how to eliminate this step to turn on the light
I give a hint: you want to change the behavior when tapping that image
i want to eliminate this screen, I want when I click the light bulb the light turns on directly without this screen
Then go for it. You already did something similar. So no spoonfeeding.
pls tell me how to do it bro ahah
No. Learn to read the documentation
pls
now i cant see the light turn on
oooooh
error?
i cant see the light turn on in the floorplan
Undo what you changed and try again
Manually undo what you changed and try again
I don't remember what I wrote haha


there are error?

what?
I have an entity sensor that I wish to flip the sign on in the display card; negative reported values should be displayed as positive and positive reported values should be displayed as negative. However I can't work out how to do so - any guidance or hints?
tell me the error pleaseeeeeeeeeee
You can create a template sensor swapping negative and positive of that entity for example.
pls tell me the error
You're trying to do something advanced without knowing the basics of how to do it. You need to read the docs and understand what you are trying to do.
but like 5min ago it worked
Then revert to what you had working and try again.
pls can you tell me if there are errors here
No! We don't have your entities or any idea of what your goal is. Only you know that. So, read the docs and revert to what you had that was working.
previously I had set that when I turned on a light, it would also show up on the floorplan, now it no longer works
Then go back to what worked before and try something else. Any errors will be displayed on the card. It's up to you to learn what the errors mean and how to fix them.
eh but the problem is that I don't remember what I did before
That's on you. Maybe you should take notes when you make changes then?
We cannot help you with that.
you cant tell me if there is an error in the text?
I'm not trying to be harsh man... but none of us here are going to be able to help you if you can't start to help yourself.

Dude... seriously. NO. Read the documentation and learn to figure out what is going on with YOUR code.
can you tell me how to fix this error so
Oh FFS
I could, but you wouldn't learn from it. All answers are in the documentation.
can you just tell me this thing pls, then I'll read everything there for the rest plsssssss
No
@wooden fjord READ THE DOCUMENTATION. Your answer is there.
I have smaller siblings. Begging is futile.
just send me the correct one pls
You already got the link
it is for another thing...
It is for picture elements
Please tell me the error, I've been here for 5 hours and I can't get it to go
i manually made a binary sensor called Patio Door History, but the name gets cut off when I use a history graph card. thoughts?
You can overwrite the friendly name in the card by a shorter one
https://www.home-assistant.io/dashboards/history-graph/#options-for-entities
doesn't let me. says;
This entity ('binary_sensor.patio_door_history') does not have a unique ID, therefore its settings cannot be managed from the UI. See the documentation for more detail.
That's not in the card
In the card, not the details page
Does it work, like you expect?
no
Then it is not correct
but tell me the error, I did what is written in the documentation and it doesn't work
Please, I also looked at the documentation and it still doesn't work
i did ths but it doesent work
can you at least tell me in which line of code the error is?
If you had used the time begging for reading the docs, you would already have found the right section
is this the right onehttps://www.home-assistant.io/dashboards/picture-elements/#image-element
You are definately get closer

?
This guessing game is becoming boring
just tell me it
Dude he's telling you "no," Jorg it might be better to disengage altogether unless they ask specific questions because this is going nowhere.
Yeah. All hope is lost. Time to leave the sinking ship.
hint: rhymes with map faction
hm
another hint?
nope
I read through the whole exchange, you aren't trying in the least bit
just start at the top of the link that @vital burrow provided you and go down each field one by one.
I assure you that I really don't understand what the error is
you'll find it eventually
the problem isn't the error, it's that you aren't reading what people are saying.
Can't you just tell me the error so this conversation ends?
it's in this sentence
Don't worry. The conversation can also end without telling you
that was 2 hours ago
i did it
so there's been 2 hours of you not looking at the one page that jorg linked here
no you didn't..
it says null
so?
yes but how do you remove that null
now it goes
note the differences
but there is another problem...
i think you want tap action.
type: picture-elements
image: /local/path-to-your-image.jpg
elements:
- type: state-icon
entity: light.your_light_entity
style:
top: 50%
left: 50%
tap_action:
action: toggle
then adjust so that your's matches the example
I would like it to turn on immediately when I click to turn it on without showing this screen
... yes
try my example. from chatgpt. your tap action should be toggle and not null.
i want to remove this screen when i click on the button to turn the light on
yep, already been said what will solve that, and you're in the process of making that work
but you aren't following the examples on the documents
this?
yes
We do not recommend using ChatGPT. It uses outdated sources and often produces incorrect solutions which are hallucinations and cause additional problems.
Could you tell me in which precise part of the documentation I find it?
i'll keep that in mind, thank you.
tap_action, as has been implied many times.
The HA website has plenty of documentation on what works where, and this Discord and the forums are great places to ask for help understanding them 🙂
I still do not understand....
because you are not reading the documentation
what does the documentation say, exactly. Verbatim.
copy/paste it here.
can you just tell me how to do it, I'm tired I've been here for 6 hours trying but I can't haha
nope, I'll try when you try
i try
now i try

I've read everything and I still don't understand
do exactly as I say: Copy/Paste the documentation for tap action here.
I'm convinced you aren't even looking at it
tap_action:
action: toggle
and where it should be
in line with style
no
and where
put it back where you had it, but make it in-line with style
on the subject of resizing;
It is not available inside nested cards: vertical stack, horizontal stack, and grid card
It is not available on the picture elements card.
i'm not seeing the "layout" tab on my history-graph card, am i doing something wrong?
this is also on a new lovelace page i've added.
did it @tacit cave
Is it in a sections view?
In YAML, indentation is important for specifying relationships. Indented lines are nested inside lines that are one level higher.
You did read the YAML documentation page, right?
@tacit cave but it still not goint as i want
that config will make it work without bringing up more info when you tap on it
no
yes
yes
but i have another problem!!!!!
now if I click on the light bulb, so where should I click to turn on the light, it shows the information, but now if I click anywhere in the map it turns on
ya cause you set the width to 100%
if that's not what you want, then the tap_action is on the wrong item
if you want it on the light, it should be on the light, not the background state image
change the action on the other one to none
idk
you sure about that?
thank you so much guys
and excuse my fucking ignorance
and why i cant found the light "banco" as light.banco ?
Banco is your device name
click on your device and look at the entity
then click on the entity and look at the entity_id
ok
for the other light i need to copy/paste and modify from which line?
I'm using some basic door controls, is there a way to add a confirmation to these actions:
each item starts with the -
??
look at your config, find the dash, copy from the dash to the next dash without including the next dash
so i will copy from the 3rd line to the 23th, and then i change the entity?
most likely
just yes or no
or maybe
https://www.home-assistant.io/dashboards/actions/#confirmation
There is confirmation for actions that you specify on cards.
You'll need to specify the entities as objects though
https://www.home-assistant.io/dashboards/entities/#options-for-entities
well, you listed the wrong line's so I'm guessing you modified things, I can't give a solid yes
so which line?
from the dash to the dash man, it's not that complicated
if you have
a:
- x: ...
y: ...
- x: ...
y: ...
you'll be copying
- x: ...
y: ...
hm
i think i need from 3 to 23 no?
because from what I know those things must be done for each light, and the entity must be modified
is there a - in line 3?
where are you getting your numbers from
so when I look at your numbers, I see different numbers than what you're listing
just look at your image
numbers on left
elements:
ok, does that have a dash?
no
ok, then why you keep saying from 3 to x?
so 4-15
does my example show you copying 2 dashes?
this example
4-15 are the 2 dashes
right, I said copy 1 to the other, not including the other.
so i copy from 4 to 14?
yep
ok
that only does your image btw, it won't create a new clicky bulb. The other item below it's your clicky bulb
and i past it under of all
it's a list, so yep
then I have to add the bedroom light, and I want the light bulb to be there, and for you to see the light on when it's on
Have a read of this: https://www.home-assistant.io/blog/2023/01/23/help-others-leave-ai-at-the-dor/
ooh read above pls
petro has aged to much meanwhile, that he is unable to read small text on big images.
He has been sent to rehabilitation and may not be available for some time.
now, light.matrimoniale is going, and light.entrata not going
You got all the things to figure it our yourself. We are not writing your configuration for you
I'm not understanding this error, could you briefly explain to me how to fix it jorg? Thank you
did it
nothing changed
when the light and action of another room is added, it is as if the one already present disappeared
Read the configuration you wrote and understand what it does
Go to sleep and continue learning and fixing your configuration tomorrow.
You got the documentation and extensive coaching by petro.
before i sleep, can you tell me whrere is the problem
You'll need to learn how to read the documentation and use YAML correctly if you want to do things like this 🙂
Sure. Something is wrong with the configuration. Good night!
hi is there any documentation around styles and what it can do?
What sort of styling are you looking at? Card mod? 🙂
i don't recall it's been a long time since i have done dashboard editing in homeassistant but here is an example off code that im am trying to find the documentation off
card:
- max-width: fit-content;
- margin-left: auto;
- margin-right: auto;```
That might be from the picture card: https://www.home-assistant.io/dashboards/picture-elements/#how-to-use-the-style-object
Sorry if I missed an obvious answer, but in the new sections layout, is there anyway to split cards evenly in 3 columns? (I've used tile or horizontal-stack to achieve a similar effect, but the layout is messier so far.) Thanks!
yep think that's it thx
You can use a grid card for that. Resizing will not be available within it.
The sections-grid (not the grid card) can only provide quarters
Hi all, say I wanted to pull specific information from a specific entity. What would I put for the yaml?
I'd like to pull Home Current Temperature
Entity is climate.home
Are you asking you want to make a template temperature sensor out of the climate entity? That'd be for #templates-archived
I just want to make a card
Dunno if that's a template
It selects the Thermostat card by default and won't let me switch it to Sensor as I want a line graph
You've got a couple options. You can make a template sensor, and then add that to any card as its own sensor. Or you can use a feature of entities card to display an attribute of an entity, e.g.:
Oh if you want a line graph in sensor card, then yes you need to make a template sensor first.
Alternatively you can add the climate entity to a history graph card, but that is a different visual style than sensor card.
Just tried that and it looks fine. Thanks!
It actually lets me combine all my line graphs too which is nice
😄
hello
not sure where to ask but I'm having a problem with my frontend and firefox. I use nginx. Sometimes I get the "Unable to connect to Home Assistant. Retrying in 54 seconds." and then I can't connect until I restart Firefox. Has anyone had an issue like that before?
sounds related to websockets in some way
yes
I think I saw an error in the console with the word websocket
not sure how to troubleshoot
now the page inspector isn't even working in firefox. Could just be firefox acting weird. I probably have too many tabs open
Thanks! Is there any way to make the grid card not expand the tiles vertically? For instance, if I do 3 tile cards of lights just in the normal setup, the tiles are rectangular with a logical height, but if I do a grid with the same 3 tile cards, the cards are square and have a bunch of empty space at the bottom. And that's true if I do 2 or 4 too. Can send a pic if my explanation doesn't make sense.
Hello everyone, I am trying to setup something and i keep getting an error. Cannot read properties of null (reading 'config') when i hit save on the card i am working on
There's an option to grid to make the cells square (or not square)
evening, all. i've got a conditional weather alert card that is working famously, but in true homeassistant fashion i'd like to break it. is there a decent way to add a dismiss button to it to hide it until the next event (or 24h, or similar)?
thanks! i though that defaulted to off but my mistake.
you can create Helpers boolean and add conditions card if on to show
Anyone know why my bubble cards would have arrows? https://i.imgur.com/zX3PsgR.png
Hiya I added Mushroom cards, but they aren't showing up. In the entities tab I only see Mushroom update
Hi There, can anybody shed some lights as to why my Pixel_7_steps sensors resets at 01:14:04 PM? My Proxmox has local Brussels time,my Pixel 7 also, my HA OS is also on Brussels time. Is there a way to set it correct
I'm looking for some help trying to understand and adapt card-mod styling from an example. Basically I want to take this example: https://community.home-assistant.io/t/dynamic-badge-label-text-colours/483254 and use it for a state-badge inside of a picture-elements card, but I can't figure out how to adapt the syntax.
here's my existing (non-dynamic, not-card-mod) card yaml:
type: picture-elements
image: /local/Floor Plan.png
elements:
- type: state-badge
entity: sensor.z_wave_thermostat_air_temperature
style:
top: 65%
left: 70%
color: transparent
--label-badge-text-color: green
--label-badge-red: green```
(there are more badges, but I just posted the first one)
I don't need the whole thing hand-held for me, just the skeleton of stuff like do I need something like
card_mod:
style: |
:host {
. . .
}
inside of the state-badge block? Because when I do that, the badge just disappears so it seems like that's not quite right.
the YAML stuff always gives me trouble, because it's always something simple like I screwed up an indentation or mixed up foo: and -foo: or else it's that I'm trying to put something in the wrong section, or something like that
What's the prefix to get an icon to show up in text?
Show up where?
I Googled home assistant add mdi to card title and the first hit was https://community.home-assistant.io/t/mdi-icon-in-title-name-of-any-card/627661
So I had to use card_mod to add css to the card, and then I copied a template
@worn badge I converted your message into a file since it's above 15 lines :+1:
Anyone know how I can overlay the last couple of days Solar values over each other on an apexcharts-card
I have this current graph, I would like to have each days values be it's own entry and thus overlayed on top of each other for easier comparisons
You can also use emojis in titles without custom components. But some browsers might not show them.
Trying another time, do we have maintainers in the custom-cards organisation?
Depends on which custom cards you are asking about. Typically, you can look at the github and see the number of issues, last release dates and such to determine if there is or isn't a maintainer for it.
custom-card-helpers and decluttering-card basically. I'd like to add the support for the new sections layout
The first one hasn't been updated for 3 years, I'm not sure it's a good idea to ping the latest commiter
Oh, gotcha. You might want to ask in #1257019582112334014 as well. Perhaps the code owner could be pinged. Not entirely sure, tbh. You might also be able to fork them into your own repo and release them as updated cards? Adding layout seems like it would be worth the ping, imho.
AFAIK the "custom-cards organization" is defunct, I don't think that page updates anymore?
Anyone here able to resize their cards?
Yes. If you're using a sections view.
the experimental feature?
Yeah.
Ohh! thank you
Morning. Looking to get a card on my dashboard but can't figure out how to get it to work. I have a sensor that will display the text and an image entity to display the image. The cards I am seeing don't let me use both the image and sensor entities at the same time.
@atomic berry So you want a stack of histograms, like one on top of the other instead of side by side?
@atomic berry I think this is what you want: https://github.com/RomRider/apexcharts-card?tab=readme-ov-file#compare-data-from-today-with-yesterday
@somber pagoda I converted your message into a file since it's above 15 lines :+1:
Any thoUghts on this?
is there a way to configure an entity to be displayed as a graph instead of whatever this is
(if unclear, this is what i want)
the only entities that are displayed as a graph have a unit attached to them (°C, min etc.). are only entities with a unit displayed like this?
It needs a unit or a state_class
it can be state_class: measurement if there's no applicable unit
alright, thanks a lot
What is the recommended way to remove and/or rearrange left sidebar elements?
- I know about
panel_customto add custom elements - I'm aware about the rearrange & hide available by holding the logo (but this is only per-browser and not global)
- I know I can remove
default_config:and list all-but-one integrations but this is doing more than just hide from menu + it needs to be maintained over new versions adding new elements - There used to be HACS plugins for that (e.g. https://github.com/galloween/custom-sidebar-v2) but I don't see anything that is maintained
Back again seeking guidance. I want to move this card to the center of the view. I can use cardmod to move it arround like this:
card_mod:
style:
.: |
ha-card {
justify-self: center
background-color: transparent;
box-shadow: none;
border: none;
position: absolute;
top: 15vh
}
But I can't figure out how to center it
hi, I've installed a lot of hacs extension, specialy frontend one. How can I check which one I'm using to make some cleaning in my module ?
How come with the mini media player It shows the covers of what it's playing for Youtube and Spotify on my Nest Hub. But It doesn't do that with my Chromecast HD?
while music works
Sometime it does work but it shows the text only with spotify
with youtube as well
and sometimes just Default Media Receiver or com.android something like that
I'm using the Mushroom Chips Card, and I have 2 entities that I want to show based on if the sensor is triggered, and it looks like I have gotten it slightly??
In the cards visibility, I have a Or condition set to go off if one of my sensors trigger and vice versa.
However, if 1 sensor is triggered, I only want one chip to show, and not both. and vice versa.
how would I do this?
hey everyone i was directed here I'm looking to try and change some icon colors on some buttons any help or direction would be very appreciative
i have a dashboard that i want to maintain a single copy of. i want it so that this is the default dashboard for all users other than me. in this dashboard, i want to restrict it so that certain users see certain cards, is this possible?
Tile cards can change the icon color permanently (just for that card). For dynamic color changes you would need custom cards/components.
Upgraded HA to 2024.7.2 however cannot see how to resize cards or change the layout, looked on HA website. what am i doing wrong
Not using sections view type?
Can anyone assist?
Don't know if this solves the problem for you, but you could make the view a sections view and set the number of columns to 1. That puts the column in the center
My knowledge of card-mod is minimal (came here to learn) but looking at CSS layout options you might try margin: auto
I can't really change to sections .. It's complicated.
I'll give the margin a shot. Thanks for the tip
Hey guys, hopefully quick question. I'm using area cards in a view, and its picking up on my oven temperature to say the room is 175F. How can I exclude a specific sensor from the area card?
AFAIK, the only two ways to do that is to remove the entity from the area or hide the entity. Currently, the area card does not support excluding entities.
Ahhh, okay
When I access my HA instance from the internet sometimes this comes up. If I do a Shift+F5 the problem goes away for a while. I'm using a Cloudflare tunnel, but I don't think that's the cause.
Also get a lot of these errors in the console, they are not present after a Shift+F5
If you are using custom cards, try to restart in safe mode (which disables them temporarily).
If the error doesn't happen there, it is likely one of the custom cards.
I'll give it a shot
Doesn't seem to help. I don't believe I have any custom cards on the default dashboard. I do have some dashboards with custom cards though. Would they cause a problem if they exist on a dashboard other than the one I am trying to currently display?
Nevermind, it does appear to be a Cloudflare issue.
Is there a way I can change the colour of the icon of a template sensor (defined in the UI) based on some state dynamically?
It looks like the DOCTYPE errors above are a result of the Cloudflare access page being served up instead of the content from HA. I do use Cloudflare Auth and a page reload fixes this issue, so I'm not sure what else I need to do. When I inspect the error in the console I get this. It's almost as if when the page loads some of the content is delivered from my HA instance, and some is from Cloudflare
<html>
<head>
<title>Sign in ・ Cloudflare Access</title>
<meta charset="utf-8" />
<meta name="robots" content="noindex" />```
hello
are there any videos or tutorial on how to make templates of cards?
I saw a video, but the guy moved at the speed of light and when I replicated it, it didn't work
hi is it possible to add something where if i click on the light bulb icon i get a thermostat card that pops up?
Any method to identify unused frontend extension ?
Edit your dashboard in YAML and search for card names is about the only way I can think of.
Remove the resource, clear your cache, see if anything breaks
I was hoping for a smarter solution.. bad luck ! tx
I once saw one video from one guy on Youtube how he created a custom button on frontend, and then saved this button in the dashboard core yaml as a "macro" or "function", that allows him to reuse the button style at several places in the dashboard. He also used some variables
what is this feature called and can I read about it somewhere?
Found it, sharing here for others: https://www.youtube.com/watch?v=EumKl7pwGM8
you can also use this one : https://github.com/custom-cards/decluttering-card/releases
Is it possible to make custom mushroom card text white? I'm struggling to find a solution as is chatgpt
thanks. that was the video I watched
he moves very fast, I don't know if I missed something, but I can't get it to work
here is my first attempt
and the second:
I have a video selected to watch tomorow
Got it thank 👍
https://i.imgur.com/Em5sFv3.png Any ideas why my bubble cards have these horizontal and vertical arrows??
I'm looking for a music playback card for use with my View Assist project. Can someone suggest something that exists that shows coverart, playback position, music controls and maybe volume controls?
Have you tried reaching out to the dev?
Hi folks. Just wondering if anyone has seen discrepancies like this screenshot? Actual value is 58%, but the graph shows a flat line above 60%?
And there is no evidence to suggest the flat line might be correct (ie grid charging, etc)
Have you tried clearing your web browser cache? Does it happen with all sensors or just this one?
@sinful ridge hi friend! I just learned about the card visibility feature, and started making makeshift notifications! Now it will display to everyone in the house the day before trash day, when the door lock needs battery replacement, filters and more! I can even display birthdays!
Killing the mobile app an hour or so later and the discrepancy has disappeared
@urban portal I was reading that template doesn't work for all, which is a bit strange to me. In your pastebin, you have "xxx:" and then definition further. So what do you put as a template, and how does HA frontned know that it has to go to "xxx.something" template entitiy?
in his videos, he hardcoded the top name and inside it was a "template name" that was later used
so I'm wondering if templates work only for one type of product
From the video, this is how he uses is:
see template: sensor_big
and this is how he defined the template in the dashboard raw editor. See the button_card_templates as a root key, and then inside is the template name sensor_big.
So I'm wondering if widget custom:button-card only looks for templates inside button_card_templates key definition
and how is this then translated to other widget types in the UI...
@vapid field I don't you are setting you're template in the correct section. It started with decluttering_templates:. Here's the beginning of one of my examples.
decluttering_templates:
gradient_gauge:
default:
- entity: sensor.s22_ultra_battery_level
- name: Red-to-green
card:
type: gauge
entity: '[[entity]]'
name: '[[name]]'
min: 0
max: 100```
custom:button-card templates are the same concept. yaml button_card_templates: generic_custom_button: show_icon: true show_name: true show_state: false color_type: icon triggers_update: all [...shortened...]
decluttering_templates is this hardcoded name? I have "bubble card" and "mini graph", so how should then look like there? bubble_card_templates and mini_graph? I don't get this point where are those names coming from. Must they be supported by the extension?
Nope. Decluttering configuration is decluttering_templates:. The type shown at Line 7 is the start of where you would define the card. Either the Bubble Card or mini-graph-card. Line 2 is the name of the template: my_commonly_used_bubble_card:, for example.
how do I later use this template in the actual view?
type: custom:bubble-card
card_type: button
template: my_template_name_inside_cluttering_templates
Like this?
I had deleted this test, so I recreated it yesterday and might have left something behind.
I guess I better take a new look into it, and follow your tip.
Thank you
thank you all, I will follow your advice when I get the chance of hitting this again.
meanwhile, I have a few questions about resources in the UI.
do the resources added, add any overhead ou their are just inline replacements?
if it's just an inline replacement, is it possible to do a macro where all the resources are defined and only add the macro to the top of tab yaml, instead of adding all the resources you need by hand?
@vapid field Have you looked at the docs? Decluttering card There are examples. Bare in mind that it hasn't been updated in many years. Don't concern yourself with resources and lovelace-ui.yaml.
Also, check out this tutorial: Home Assistant Decluttering Card Tutorial by SmartHomeScene.
Is there a way to sort cards based on highest value? I have the some custom button cards with power values. I would like to have the highest number on the left 🙂
Should be able to do it with an auto-entities card. Just define the card in the options: section. Sorting entities.
Oh i have never used the auto entity card, i need to check it out
so i basically use that, and add the button card, and it gets used for eatch entity i add? 🙂
card:
type: custom:button-card
Hello! I made a simple template that changes an icon based on a location sensor. Is it possible to extract the icon attribute in an entities card's icon field?
Hi all,
Im looking for a way to change the following colors of a tile card which is embedded into a conditionalcard & vertical stack card:
Icon color;
background of the icon color:
Background color;
Name color;
Ive got the card-mod installed already, and got myself so far that i can change the icon & background color. Yet, i cant find a way to change the name value.
Not 100% sure if this works, but it --card-primary-color: and --card-secondary-color: might work?
This worked in the mushroom card, but havent tested in tile card 🙂
Thanks for the input, does not seem to work 😦
Hi, is there any way in HA to create a chart that only shows updates from when a sensor actually sent information, not time-based?
I have integrated my telescope into HA, so am getting data during the night - and I want to stop the charts updating once it shuts down in the morning, rather than having the chart continue to show the last value all the way through the day, pushing the last real data out.
I would say using conditional cards
If I understand that correctly, that would hide the whole card - I still want to see the data from the night, I just dont want it to be showing as if data had been coming in during the day. Maybe I'm trying to do something that goes agaisnt the heart of HA
ok, sorry about that, i know how to do it in a custom:button-card though hehe but that does not help atm
Im really glad that you've tried to help, so no need for any sorry! Many thanks 😄
Theres allot possible with HA with scripts and that kind of stuffies
Kinda; sorta. It gets a bit tricky depending on how you it to display. I have an example that I'll DM to you.
Can you post your code to show what you're working with already? (You won't be able to change the value of the name with card_mod; only CSS-related stuff.)
@somber pagoda Here's a little bit that you may already and a perhaps a few more: yaml type: tile entity: sensor.interior_temperature card_mod: style: | ha-card { --primary-text-color: white; --tile-color: rgba(255,0,0,1) !important; --icon-primary-color: white; background: rgba(255,0,0,0.1); font-family: stencil; border-color: white; }The card doesn't support a secondary color and the icon background appears to have opacity hard-coded.
Hey, sorry i was a bit distracted at work momentarily
type: tile
entity: binary_sensor.vaatwasser_door
icon: mdi:dishwasher
name: Deur van de vaatwasser staat open & vaatwasser staat aan!
hide_state: true
card_mod:
style: |
ha-tile-icon {
--tile-color: red;
}
This is exactly what i am looking for, many thanks!
Do you have a same example for the mushroom media card?
@somber pagoda I converted your message into a file since it's above 15 lines :+1:
type: custom:mushroom-media-player-card
entity: media_player.living_room_6
card_mod:
style: |
ha-card {
background: rgba(255,0,0,0.1);
border-color: white;
font-family: stencil;
--card-primary-color: white;
--card-secondary-color: white
}
mushroom-shape-icon {
--icon-color: white !important;
--shape-color: rgba(255,255,255,0.2) !important
}```
You are amazing, thanks! 😄
A lot of these variables can be set in your theme so card_mod isn't necessarily required. It's just a matter of figuring out the variables.
How do you figure these out? Documentation?
ha-card {
--card-primary-color: green;
background: rgba(255,0,0,0,1);
}
mushroom-shape-icon {
--icon-color: green !important;
--shape-color: green !important;
}
This does not seem to work for my icon
Your background RGBA is wrong. rgba(255,0,0,0.1) You have an extra comma instead of a period. Probably breaks from that point on.
Ah i see it now
Thanks ❤️
Also after removing the entire line, its not working for the icon
Adjusted content which still wont change my icon color:
card_mod:
style: |
ha-card {
--card-primary-color: green;
--card-secondary-color: green;
background: rgba(255,0,0,0.1);
}
mushroom-shape-icon {
--icon-color: green !important;
--shape-color: green !important;
}
Finding where someone else has already done the leg-work is always useful (such as in the forum). Next, by Inspecting the page. Search here in the channel for in:frontend inspect and you'll see some stuff about inspecting (particularily the screenshots posted are useful.)
Ah thanks!
You need to use an RGBA for the shape-color. Green is setting 100% opactiy which is the same as the icon. So, you're only seeing a green circle because they're the same. Opacity is not hard-coded into this card's icon shape.
--shape-color: rgba(0,255,0,0.1) !important;
card_mod:
style: |
ha-card {
--card-primary-color: green;
--card-secondary-color: green;
background: rgba(255,0,0,0.1);
}
mushroom-shape-icon {
--icon-color: green !important;
--shape-color: rgba(255,0,0,0.1) !important;
}
Still not changing the color of the icon
I wonder if your theme is overriding something. Try this:yaml card_mod: style: | :host { --rgb-state-media-player: 0,255,0 !important } ha-card { --card-primary-color: green; --card-secondary-color: green; }This is one of the variables that I mentioned. Both --icon-color and --shape-color reference the --rgb-state-media-player variable (with the later adding a 0.2 opacity.)
I got it working! thanks buddy!
card_mod:
style: |
:host {
--rgb-state-media-player: 0,200,0 !important;
}
ha-card {
--card-primary-color: green;
--card-secondary-color: green;
background: rgba(0,200,0,0.1);
}
mushroom-shape-icon {
--icon-color: green !important;
--shape-color: rgba(0,200,0,0.1) !important;
}
Still default color 😦
try did you try to remove all the other stuff you added, and just add @tribal galleon code? just to confirm spelling and spacing?
Also copied your lines and removed mine, still not working
Yes, was just typing that 😛
I copied and pasted your code back into my card. It changes the icon for me (even though the --rgb-state-media-player and mushroom-shape-icon section are redundant.) I thought for sure going to the :host level with the added !important would have fixed it. What browser are you using? Also, have you tried saving the card and seeing what it looks like on the dashboard. Sometimes card_mod doesn't "update" in the preview.
MIght it be a problem that the media player has been embedded into a conditional card and a vertical stack card?
Im using Brave as browser
works in brave, just tested
@hard blaze We're working on Mushroom Media Card now. Syntax is a little bit different.
oooh my bad
Also i saved the cards, refreshed the page but still no succes 😦
I'm at a loss as to why it's not working on your side. I don't really see anything else that can be modified that would affect the icon.
Shall i try to delete cache from the browser once?
nah. don't think this is a caching issue as I'm pretty sure variables aren't cached like that. But, it wouldn't hurt anything in trying.
Nah, didnt help
The icon does not work, i just accedently used the same color as the default when state = on
Working a different approach. brb.
card_mod:
style:
mushroom-shape-icon$: |
.shape {
--shape-color: rgba(0,200,0,0.2) !important;
}
.: |
ha-card {
--card-primary-color: green;
--card-secondary-color: green;
background: rgba(0,200,0,0.1);
}
ha-state-icon {
color: green
}```
.: |
Is this correct?
In the code
I copied - paste the code exactly as you send, nothing happens to the entire card
Yeah. It's a different method of accessing the elements. (The .: | is what "allows" both methods.) Everything that I've posted has worked on my side. Not sure why things aren't working on yours. I even consulted the Mushroom Cards Card Mod Styling/Config Guide.
Not sure what your indention looks like above Lines 36. You may need to highlight the whole card_mod section and press Tab once.
Okay, that did the trick. Its working now 😄
Tabbing seems to be the issue
Many, many thanks!
This is awesome, Will!! Thank you for sharing! 🤩
I used the workday integration to define days as sensors for the trash day card
anyone out there that can help with navigation of subviews with buttons? I am pressing the button without results. Im sure it has to do with the wrong url I am putting in. I am using homeway.io and wondering if that is the root of my evil. my subview dashboardl is /new-sections-board/lighting-2. the url at the top of the page is https://shadow.homeway.io/new-sections-board/lighting/2 but may be https://shadow.homeway.io/new-sections-board/lighting-2 (Root URL has been slightly modified for privacy)
type: custom:button-card
name: HOME LIGHTING
icon: mdi:lightbulb-group
tap_action: navigate
navigation_path: /new-sections-board/lighting-2
solved
Hello everyone,
Any idea how to create switch button, which will work with switch entity and the same time will show next to it name and another entity with power? Cannot connect these together
code:
type: custom:mushroom-chips-card
chips:
- type: entity
entity: switch.sonoff_xxxxx
content_info: name
icon_color: blue
tap_action:
action: toggle - type: entity
entity: sensor.aktualni_xxxx
@wet gulch I converted your message into a file since it's above 15 lines :+1:
ui-lovelace.yaml has been deprecated for a long time.
Adding resources there, yeah. Years out of date
Hi everyone! I'm looking for a decent date-time-picker to include into my dashboard to set a start and end date-time. I couldn't find anything aside from a time-picker only input. I hope you guys might have an idea what i can use?
Anyone know of any issues with IOS and reading SVG ? i have a card that i made, works on all devices except for an IOS deivce
something like this?
not sure where to ask this. i want to create a custom cover and use it to call a service. this is a custom service which i am testing, and all i want to do is report the position of the cover when it changes whether via open/close or direct change. so
data:
position: {{coverposition}}
action: position_changed
Would there be a possibility of a way to make a card that I could basically have automations push text messages to with datestamps that last for a minimum amount of time? Akin to (or part of logbook card) but have a script be able to push a template or explicit text line to it?
https://i.imgur.com/QQRT0pa.png Still getting these weird arrows on bubble cards...
also the left side looks squishes? the icon is too big or uncentered, something.
@devout thicket you the bubble card dev? been fighting this for a week.
i rlly wanna use these cards 😦
I'm almost certain what those arrows are. And you're mostly right on the idea that being too big or uncetered. The problem is it is a little bit too big of a graphical element for the card, so it dropped scroll arrows on both the x and y axes of the UI element. If I had to guess, it's only a few pixels too large in one or both directions. I have had times where I've done work in other software where if it's a pixel two large and one direction it creates the scroll arrows which then makes the other side too small and makes scroll arrows for the second side. I don't know the syntax for that card, maybe I can take a look into it later to see if I can pinpoint anything for you, but there's a way to change the size of the bubbles that's where I would start
Ive tried all different bubble sizes (large and small), different dashboards, clearing cache..
it looks fine on mobile.
Ik the dash looks like shit but I’ve been wanting to use these bubbles so I haven’t done anything with it yet..
This is going to sound crazy but I've ran into a similar problem in other sites, check your zoom? Like in Chrome I think it's control zero
negative on that one sadly
I've had times when a UI wasn't rendering properly and elements were all screwed up and we found out I was at 110% zoom. Not enough to realize something was wrong but enough to screw up the system
Similar vein question, different browser?
I'm honestly just spitballing to the normal IT troubleshooting
what the fuck man
its fine in furryfox
also fine in chrome..
@lament oyster check if bubble cards are also broken in edge for you
I can't check edge because I'm in Lenox, but edge is now a chromium based browser so I believe that uses the same rendering engines as Chrome does
you'd think.
So when I get a chance to poke at bubble cards since I normally work in Chrome I'd be able to see that fairly quickly, but then also check Firefox
whats lenox
Oh yeah definitely, I just don't have the means to test that myself because even if I put edge onto a Linux desktop, it's running through wine which isn't going to be reliable for bug reporting
Is it edge 🤷🏼♀️ is it wine?
The world will never know
Reee indeed
@lament oyster struggling to add custom color variables
I still haven't even made it in my front door yet, sorry that I'm so far behind the curve
The joys of being disabled and then getting stuck in hour long phone calls
this week has been ... a challenge. Just put it that way
felt that, work was fucked
https://i.imgur.com/HT8oLDz.png I wish I could make these energy bubbles skinner, like 1 width instead
Exactly! I'm new to HA, so maybe I've missed something obvious?
Hi everyone, I'm currently building a dashboard using Bubble Cards in the Bubble Theme. Regarding colors, I would like to color my buttons differently (I can see this is being done in many screenshots) and I found the instructions on the bubble card github.
However, I wonder if it's possible to use CSS Color variables instead of Color codes. Does maybe the Theme supply these? Or can I somehow modify an access them in the styles sections of the Bubble Cards?
So, I dont want to do this:
.bubble-sub-button-3 {
background-color: '#e08283';
}
But somethin like this:
.bubble-sub-button-3 {
background-color: 'var(--green)';
}
How Could I define green / which ones are accessible in this theme?
Allright, nevermind, I found this in the theme file. THere are nice colors there
- type: entities
entities:
- entity: input_datetime.start_time
name: 'Starttijd:'
secondary_info: '{{ states.input_datetime.start_time.state }}'
- entity: input_datetime.end_time
name: 'Eindtijd:'
secondary_info: '{{ states.input_datetime.end_time.state }}'
show_header_toggle: false
it,s just an entities card with 2 datetime helpers inside
here is the yaml. Make sure you create the 2 helpers.
Awesome! Thank you! I only tried the entity card and thought it would behave the same as entities 🤦♂️
Np
Hey #frontend-archived Stupid and hopefully easy question. I have a sensor being updated with a URL I wish to use in a generic camera card but am having issues getting the value of the sensor used for the Url target. Is this possible. I am sure I am doing something stupid bu thave looked into it and tried a hand ful of things that I thought would work.
entity: sensor.mealie_today_s_meal
camera_image: camera.food_dev_name_com
show_state: true
show_name: true
name: 'Tonight''s dinner:'
camera_view: auto
type: picture-entity
tap_action:
action: url
url_path: sensor.mealie_dinner_s_url
You can't have dynamic url path like that.
I think maybe what you want can be achieved with a template image.
I think I may have that set up as I have a sensor populating the daily image...
so you are saying maybe the image can be hyperlinked there and then I do not need to do it on teh FE>?
oh wait nevermind, I was thinking of dynamic image, not dynamic hyperlink.
I can't really think of a way to do that 😕
maybe markdownable?
is there a way i can disable a switch from being manually activated?
a real switch or a helper switch
the ui element for a power plug controlled via zwave
i just want to avoid accidental touches because it would be very.very.bad
is just making it invisible good enough?
UI element as in in your dashboard?
You can change the actions on cards to be none, so a tap won't do anything to it.
that too!
The documentation on actions for dashboard cards: https://www.home-assistant.io/dashboards/actions/
I'm trying to make a dashboard that's just in one column. I'm on 5th card and it now jumped over to the second columm. How do I fix this having multiple cards?
@waxen lava put all the cards within a vertical-stack
✅
Any way to have a duplicate dashboard for PC and Mobile?
So when we add something in one it gets added in the other as well, but the organization of each stays different?
That way one can hide in mobile as it shows in PC and visa versa.
I just when I make a card for 1 dashboard I make a duplicate of it and then move it over to the second dashboard. As far as linking edits to 1 dashboard mirroring to a second one I'm not sure if that's a function or not
Yes, that’s what I was asking for, it would be a hassle to move over every tinny edit to the duplicate so I was asking if there is an automated way of doing this.
Perhaps they will add the feature into HA later on. 🤷♂️
For what it's worth, when I do that I can just switch to editing the yaml code, copy all of that and then replace the second dashboards code with it to mirror the card that way.
Linking card statuses almost as entities might be a feature upgrade they could explore in the future
Ya, I know about copying card codes, but it is still a hassle vs modifying your board freely and moving on…
I think we can also hide cards based on connected device, but if not they should add that feature too. 😅
That is absolutely an option. I did scripting on the dashboard I'm working on right now that if my bedroom lights are off it only shows the one button, but as soon as I turn the lights on it shows me controls for each individual light
So that I absolutely know is a function
Hopefully I got the right section.. Anyone run into this problem and know how to fix the overlapping view?
That’s not the same as having it detect a mobile phone vs computer and showing a card or dashboard based on that.
Delete this part from your card’s code and see if that helps to solve the problem.
layout_options:
grid_columns: 4
grid_rows: 2
If you're talking about browser based that might be tricky, but if you're talking about using the companion app, you can make shortcuts to specifically tell the companion app to open a specific dashboard
Then you just point it to the mobile dashboard and you should be good to go
Oh man, you might hate me but I don't have those listed. I'm newer to customizing the dashboard, so it's probably some silly item.
Well, it needs to detect if it is browser the size of the browser and mobile app, and based on the screen sizes it determines how the layout should be and what cards should show.
Here's the top section:
type: custom:layout-card
layout_type: custom:grid-layout
layout: null
cards:
In that case never mind I don’t know how to fix that… maybe with a grid card?
Or
Try horizontal-stack card
I wonder if this is a limitation in the preview?
View Type: Grid(layout-card) > Horizontal Stack > x3 Vertical Stacks
Seems to be when I remove the manual card dimensions, it prevents the issue.
card:
~~ - height: 60px
- width: 225px~~
Try using another card for the light entities and see if it gives the same problem or not.
Try button card, entity card, entities card, glance card… then change the settings to add or remove click-ability to it.
Hi. I have a "tri-phase powerclamp meter". I'm currently displaying power and powerfacfor for each phase as gauges.
I never know what's connected on each phase (Phase A= bedrooms sockets +... + ... , PhaseB=kitchen+..+.., phase C=Living+hall+... )
I would like to have something like a "Info button" to display a popup, or better "on-hover" info. I haven't found anything standard nice and sexy.
I'll start with a "i" button to display a subscreen. Did i missed something with "Mushrooms" ? Thx.
I just found something. There is a "hold action" on gauges .... Not available trough the GUI.... 😦
hold_action:
action: navigate
navigation_path: /my-subviews/phase-info
*** Solved ***
When using a grid layout with auto entity, is there a way to reduce the spacing between the cards?
type: custom:auto-entities
card:
type: custom:layout-card
layout_type: custom:grid-layout
layout_options:
width: 100
layout:
grid-template-columns: auto auto auto auto
grid-template-rows: auto
never mind.. reading the docs helps hehe
Can someone give me some inspiration for a tablet dashboard?
I got this one from a youtuber and just added my own entities, however i just can't wrap my head around the grid card
it behaves very weirdly, at least in my case, so i'd rather switch to another way opf organizing my cards
if the button card i'm using wasn't massive i'd be able to full this off using stacks
did you add how many columns to show in the grid?
columns: 6 ```
yes
every grid card has the columns set
but it still pushes other cards in a weird way, making some completely dissapear sometimes
ok. it really helps if you share some of the code your using, like the light grid as an example.
Not sure if i can help, but it helps so that others can help see through it and try to help you out 🙂
Take this for example
everything but the sidebar and light grid deleted
trying to duplicate the grid just hides the old one (it is there, i can see it in the code, just doesn't show up)
here's the code for my light card
https://dpaste.org/j6xHP
i don't see any issues..maybe the sidebar is influencing stuff a bit ?
the sidebar code is a bit cluttery: https://dpaste.org/YGyZY
Any way to have a duplicate dashboard for PC and Mobile?
So when we add something in one it gets added in the other as well, but the organization of each stays different?
@lament oyster @drowsy void Looking at your conversation from earlier (regarding an adaptive mobile vs computer dashboard), what you want to look into is using the custom:layout-card with the mediaquery options. Take a look at the Grid Layout section and expand the YAML code for the example.
You can also look at the Card Visibility section below that to see how to apply mediaquery to individual cards.
mediaquery: "(pointer: coarse)"could be useful for only showing on touch screen devices.
Generally, you can have a bunch more options when working with a card's YAML vs its GUI. Try to start working more with the YAML and you'll find yourself not even needing to use the GUI. This becomes particularly helpful when working with cards that don't have a GUI and you have to reference to docs to get it set up and what options are available. (Changing options in the GUI and then taking a look at what changed in the YAML is a good start.)
In a auto entity card, is it possible to use conditions? example: i want to only view entities that has both label 1 and label 2... not if it only contains one of them
Likely a configuration issue
Can you give me a sample code to work with so I have a better idea of what you mean?
It will allow me to have a duplicate board one for mobile and one for PC with different organizations in both?
You can use conditions to hide if conditions aren’t met. Then use and condition so both need to be met for it to show.
does anyone know where I can see my previous actionable notifications from the mogile app or even from the front end?
Thanks. I found the "and" statement in the docs
Hello,
I would like to change the background of a Lovelace dashboard via service call. Is this possible right now? I know I can do it manually via the web UI.
My plan is to do an image generation via API to generate an image of my current location and weather forecast for the day.
Is this possible?
Not possible yet (at least on iOS). What I do is for every notification I send to mobile, I also create a persistent notification as well.
Do the actionable buttons still show in the persistent?
Not possible with a service. You might be able to save the image to the /www directory and then reference it there, but I’m not sure how you would auto refresh the background though. Maybe with a setInterval() in a JS component.
No. But you could log what they are in the persistent notification.
It’s also hard to see if the notification contains an actionable action. As there is no indication
I dont mind that, I will only change it once a day. Probably before I wake up and view the dashboard
Then I’d go that way. You could use a restful command with a time trigger to grab the image and save it to /www.
Yeah, true. Ask in #ios_and_mac-archived or #android-archived They might have some other ideas.
Will do, I was also thinking to making a thunder bolt icon in those messages so I know there actionable
That’s a good idea!
here's mine, but it's always a work in progress 😄
I have made 2 rows that I always use and want to see, on the right it changes everything dynamically depending on conditional time or switched on devices.
I am also always looking for new ideas.
That looks good
Think i finished mine
The media tiles are conditional, depening on what device is playing
If no known device is playing, but spotify is, and i am home, it shows the spotify card
it looks really nice. but also nice to see that i'm not the only one who has little problems with different sized cards, especially in height. i keep thinking i'm done, then i sit back, look at it and start again 😄
I have 3 dashboards for tablet right now
Made one every day since when i wake up i don't like the one i made yesterday
is there a place that gives suggestions on how to do that home layout thing?
unfortunately i don't know that either. here maybe? i think a lot of it is personal taste. Where is something placed, what color is it, etc... often I think the longer I look at something, the more it needs to be changed. sometimes i annoy my friends & family with it and ask them for their opinion, not technically but simply visually 😄
I meant the 3d model, basicaly the 'Rocky's Place' card
ah yes. is it allowed to post youtube links 😄 ? but its in german
could DM if it helps. Probably at least give me a starting point
Links are fine in here. They don't embed in this channel like some of the others.
ahhh ... fair enough
I'll dig more into it later. RL sick so focusing on something that is a pain, but definitely got a starting point
I'd like to make a "service" dashboard page, to loop through all entities that have "_battery" in its name and then display name of the sensor with the entity and the battery value
is it possible in HA to simply use the for loop and create dynamic dashboard ?
super easy & implemented. works well. thanks
HA newb here... per some guidence from general, moving my question here. Trying to add what looks like an amazing card: https://github.com/FamousWolf/week-planner-card/blob/main/README.md but apparently hacs is not reviewing right now, so tried manual. I was told the hacs review does not matter but I get an error when I try to add the url https://github.com/FamousWolf/week-planner-card
is there a way to add more links to other stuff here? ... like say, an integration? I would love to put a link to Zigbee here
This is one way: https://gist.github.com/balloob/580deaf8c3fc76948559c5963ed4d436
@drowsy void So I've tried just about everything but can't seem to get it fixed. I compared the preview shown in the screenshot to my phone and seems like it's a mobile responsive view.
Not sure what you are doing at this point lol
Are you trying to make something like this?
The N opens these boxes, when I click it again they hide. These toggle my Node Red automations to stop them individually.
@drowsy void
So I'm customizing a dashboard using the following:
View: Grid (layout-card) > custom:layout-card > then a bunch of horizontal, vertical cards, etc.
So on my tablet, everything looks perfect. However, when confuring through the UI, my preview is shown below which makes it really hard to customize.
(I know they look uneven on this view but on my tablet it lines up :/)
@celest barn I think the horizontal-stack card at line 10 is extraneous. You're already using a grid layout but you've only defined one column at line 4. (Like, you're nesting elements that don't need to be nested.) grid-template-columns can accept percentages so 33% 33% 33% would give you three equally sized columns.
I'll give this a shot, thanks for the reply!
@celest barn Also, the GUI Preview isn't really intended to show an entire dashboard; it is only intended to display a single card (or maybe a couple). The reason why it isn't showing properly is because it is trying to display the custom:layout-card. You may find it helpful to have a secondary view where you can design the cards and then copy the code into your primary view.
Does anyone know of any white board type cards I could use? like something my girlfriend and I could use to leave little notes for each other on the home page.
Is there a way to make a "Sections" dashboard take up the full width of the screen like the "Panel" type?
How can i rename what is showed? https://i.imgur.com/YsIO74w.png
- style:
top: 10%
'--ha-label-badge-font-size': 1em
left: 80%
transform: none
type: state-badge
entity: sensor.tomat_temperature
I wonder if devs ever make titles in section view clickable to navigate to subviews.🤔
My current light/device cards look like this
Can someone recommend me some that look more like the ones found in the google home app? I reall like those
@dark dirge You were correct, you told me to "just follow the instructions" and it worked, but it would have been a bit more helpful to point out the instructions that I had missed were installing HACS. That said, I don't want to look a gift horse in the mouth too closely, so thank you for the guidance.
If you're using the custom:button-card then that card has a lot of styling options that you can use to make it look however you want (though it may take a little bit of work). Take a look at the Styles options to get you started. This screenshot shows how @zenith stag and I made a custom:button-card look like a Mushroom Light card. The custom:button-card can then be turned into a configuration template to easily duplicate the settings across multiple cards. (This example was about 90 lines.)
But, it looks like you're using the Mushroom Light card. In order to stylize it, you'll need to use card_mod. I suggest looking through the Mushroom card threads in the forum to get started with that. Mushroom Cards - Build a beautiful dashboard easily mushroom (Part 1) and Part 2. (Part 1 has 10k posts and Part 2 has another 1k.) You might also consider incorporating the Decluttering card to basically make a "template" similar to what the custom:button-card can do.
But, if you want a bit easier approach, consider the Bubble Card. It has a similar look to the screenshot and it can be stylized to your liking. The Decluttering Card could be useful here, too.
Hi All, I have these "Chip cards" in android, really helpful and a clean way to see battery status of a few key items. I am wanting to replicate the size and design on a dashboard of mine. The outer edge shows the battery percent visually and changes colour based on the battery %. Any suggestions where to start? I was looking at ApexCharts radial, but I can't seem to get it small enough. So wondering if anyone has any suggestions.
You could use a card that me and @tribal galleon created but it's not round. This card can be used with auto entityy.. so use a label "favourite" and it will show sensors you have put in favourite.
I can probably create a rounded one as well though.
This is neat!
I imagine it wouldn't be hard to adapt the setup into a round-looking card. I have round buttons for bulb color selection. The layout would have to be changed a bit, too.
Yeah, I can create one later I think 🙂 would be fun to try!
That's pretty close to what I am looking for. What's the card called, and is the info on Github?
Round would be much better with me theme. Do you thing a simple Card_Mod with a corner Radius equal to the 50% of height would work?
I added the GitHub in the original post
The underlying card is a custom:button-card with some styling and voodoo to make it work.
Awesome, thanks chaps
All coding is Black magic and Voodoo to me
so, i got this example working. but its not 100% yet.. but just to show you its possible.
Have you just created that? 🙌. That's awesome. If I can tweak text position and boarder thickness etc. Was this from scratched or based on the square one you showed above?
I just changed some of the code from the card i shared with you 🙂 Give me some time, and i will try to clean it up and share it with you 🙂
Thanks! Gonna have a look at it after vodafone fixes their shitty internet
@desert crag My take so far (with BerrisNO's guidance on the SVG path. I don't have the "remaining part" of the circle (gray) from the screenshot, but I think there might be something that could get that to work.
I belive you can use box-shadow for that grey thingy 🙂
You guys are awesome.
box-shadow with a 0px spread radius and inset with 8px width. ```yaml
- border: none
- box-shadow: 0px 0px 0px 6px inset gray;```(This example is using some hard-coded values and variables to handle the icon and percentage for demonstration.)
nice work! 🙂
you might want to add opacity to the box shadow, but individual users can do that if needed
As you were typing that, I was trying to get the color from LordOfTheBunnies's screenshot but there is a gradient so it isn't a single color. Either opacity or a lighter color might work.
yeah. it might aslo be a gradient shadow as well
Couldn't just add opacity to the box-shadow but RGBA works: - box-shadow: 0px 0px 0px 6px inset rgba(128,128,128,0.6)
EDIT: Forgot to change the icon for that screenshot... 😄
well look at that 🙂 a beauty!
Now, the hard part is to see how it handles being set to a different size. Right now, I have it set to 100x100px.
Well use my example it should handle it well, I removed the size and only uses the aspect ratio
i used this in the top of the button-card:
show_icon: true
show_state: true
aspect_ratio: 1/1
the only problem now, is that the box shadow does not match if you make it bigger.. but all other parts work:
I never had the best of luck with aspect_ratio; usually hard-code the height and width.
The box-shadow width and the stroke-width don't really correlate when resizing. But it looks like desired stroke-width rounded down to the nearest even number minus 2 and then divided by 2 seems to work well. (This is zoomed in to as close as I can get. Not noticeable at 100%.)
(We were typing at the same time...)
a bit overkill size though.. but was just to view
well its a step in the right direction though hehe
should we maby create a new thread for this? i feel we are spamming this channel 100% 😛
We probably should have done that an hour ago. Didn't think we'd get this far this quickly...
I have an idea on how to fix this.. just need to play with a new SVG.. brb
Custom button card styling (border with SVG)
i have this code, https://pastebin.com/7tgbYVTP is there anyway to make the cards transparent ? my google searches didnt find any solutions
Since you already have card_mod installed, apply this to each of the Mushroom Light cards. ```yaml
card_mod:
style: |
ha-card {
background: none;
}````noneortransparent` will work.
thx i will try that
isent there a way to do it for all the cards at once, or should i rewrite the whole setup then ?
@sour garden You can find a lot of styling help in the [Mushroom Cards Card Mod Styling/Config Guide}(https://community.home-assistant.io/t/mushroom-cards-card-mod-styling-config-guide/600472?u=d_sellers1). Although it doesn't specifically show how to make the background transparent, it does show how to set a color and that's where none or transparent comes into play.
okay, ill take a look there thanks again 🙂
It looks like if you set the theme variables --ha-card-background or --card-background-color to transparent then that would work but that would apply the transparency to all cards that reference those variables. If that's not what would want, consider checking out the Decluttering card.
Reuse multiple times the same card configuration with variables to declutter your config.
and one more thing, i can see it works on the mushroom cards but the markdown card i cant change the background
Background for markdown and some extra.yaml card_mod: style: | ha-card.type-markdown { height: 40%; background: pink; border: 2px 20px red; }
@tribal galleon great it worked after i put the background at the start of the conf, again thanks for your help
@golden mirage Were you able to get the progress bar to be adaptive regardless of the shape? @hard blaze ^^^
uuh
Yes
Yes
how? 😛
When you finish this card can you ping me? Would be a great addition to my dashboard
follow the thread 🙂
Didn't even see the thread. Done
How can you make your dashboard confusing for others? Use three languages
How do custom fonts work?
I have a custom button card, that displays a big clock, but I'd like it to use a custom font named 'AppleSDGothicNeo-Thin.ttf' which I've put in my /local/fonts folder.
@half cairn I converted your message into a file since it's above 15 lines :+1:
But the font is not changing. Should this work, or should I place the font somewhere else, or call the font differently?
Hello I have also installed the dark thermostat via hacs. Must i put something in the lovelace because I receive always no card type configured? Thanks in advance.
How can I specify the color of the dropdown field for the custom:mushroom-select-card and change the media button backgrounds for custom:mushroom-media-player-card using card mod?
This guy explains it well. His videos are a little qui k so sloe them down at 0.75x and it's a little easier to follow.
https://youtu.be/p6HAxsEGe9M?si=d-HAeM5Tr80pskeP