#frontend-archived
1 messages · Page 28 of 1
little bit of progress, it seems that it didn't like the fact that the js. wasn't in the root www, i've tested also the simple example custom card to see if that works and it does. so after moving the leaflet-map-card.js out into the www root i get a new kind of error i.setConfig is not a function
well sounds like you are making progress
believe that custom cards must implement setConfig, this should be covered in the tutorials you were given.
it seems that it didn't like the fact that the js. wasn't in the root www
I'm almost sure this is just a caching issue that was resolved by moving the card. I tried testing a card under www/map/ as you did and it worked fine.
Are there any cards that are suitable if I want to have an "advanced mode" or "expanded" view? I have a couple of switches for our shower but I want to add a fan control override, but I don't want it visible all the time.
Alternatively I'll just make a new tab, but would be cleaner on a card I think.
hey guys, what are some good graph related cards that people use? i've seen mini graphs card and apexcharts card but neither of them do what i want, so was hoping for some other options if possible
There's quite a few options you could try. Like you mentioned, another view would work. But than that would be a sub-view which does not appear in the header and includes a back button.
You could use a conditional card to show the extra stuff if certain conditions apply or maybe toggling an input boolean helper; hidden if not.
Better yet, using browser mod to make a pop up with whatever you want. Takes a bit of work but would probably create the best experience.
Bubble Card also has pop up capabilities but works a bit differently.
Is anyone's energy usage squashed like this on Android?
Try updating card_mod
thanks, it says You need to manually clear the frontend cache after updating. is that in developer tools?
Whatever your browser uses
Thanks @dark dirge , fixed! 🙏
Thanks, I appreciate the overview.
Took a while, but thanks to the help from you and @zenith stag it turned out pretty good! It's not perfect, but it's nice to have on under the hollidays. The background is animated too with snow falling 🙂
May I suggest you add a backdrop-filter: blur(10px); or so to the ha-card if you're using card-mod?
I will try!
haha wow, nice idea with the lights too. Well done! I expect they are automated.... 😉
When you turn off the lights in the house they also shut off would be a good addition 😂
have you managed to get that working in the iPhone app too? For me that only works in the browser. (have not used card_mod though, only through the button card)
Having a "gang" threw me off until I realized you were Norwegian. 😂
hey, i would like to try my luck again and see if anyone can help me fix this and somehow set a fixed height/extend it
now please pick up Petro's suggestion and post that yaml 😉
I suppose you're not talking about petros suggestion to me to put that in as an april fools joke?
And since it can't be repeated enough: There will be no more april fools jokes in card_mod. Never. Except by mistake.
nono, I meant to put that in a community post and make many people happy 😉 see: #frontend-archived message
btw, I really liked that joke, but thats besides the point
this was as far as I got with my Christmas theme, some jingling bell buttons
but I do like those lit footers, and maybe the animated snow..... even if we dont have that anymore
playing with that now, I see that a particular mod doesnt work anymore: ha-card { overflow: {{'hiddden' if is_state('input_boolean.hide_card_overflow','on')}}; } this used to hide the top corners overflowing the border, but now still shows like this. I already tried it with !important too, but no change there
you have three "d" in hidden
Bingo! thank you.....
The yaml for the dashboard is huge, but if you want to do this yourself the code to add the snow is: card_mod:
style: |
ha-card::after {
content: " ";
background: top / contain no-repeat url("/local/images/christmas/snow.png");
height: 26%;
position: absolute;
left: -1%;
width: 102%;
top: -20px
}
You will need to play around with the positions and sizes though
I also put a custom gap card on top of all the 4 columns so the snow dosesn't clip the top bar of Home Assistant
I loved your christmas theme though!
ill give you mine, if you give me your footers 😉 o and that image please, saves me the hassle of finding it on the internet....
Are you thinking about this?
I changed the footers, as when I used the same code as the top part of the card I "locked" the footer in place, so when I had conditional cards and stuff show up the light in the bottom was misplaced. So I just added the .png to the footer in entities card and that looks good enough for me
So now it looks like this:
hmm, ok thanks, I must have some deeper thought about doing that, as I now discover I didnt only set a theme, but also several conditional button-card templates.
those are pretty simple, but its a bit of a complex thing when combined. maybe we should open a nested thread here to not oversnow this
Christmas theme
Im trying to change colors for a custom button but the colors wont change when I switch between off and on. it stays at blue color
type: custom:button-card entity: fan.hall_fan show_state: true name: Hall Fan styles: grid: - grid-template-areas: '"s" "i" "n"' icon: - color: | [[[ if (entity.state = 'on') return 'blue' else return 'white'; ]]]
You can use state in custom button card to set state colors.
Aren't you missing an equals sign?
that joke actually made me laugh
I had to read it twice before I got the point 😂
You mean this?:
if (entity.state == 'on')
Just a guess.
IIRC, one equal sign for defining a variable, two for comparison, three for strict comparison
If it's backed by JavaScript, one is assignment, two is comparison and three is strict comparison.
And assignment is also a statement, so it'll return the assigned value.
Which will then evaluate to true since it's not undefined.
So ultimately, always returning blue.
@fading musk Like Caspix mentioned above. You can use state: which can be easier for simple on/off styling. ```yaml
state:
- value: 'off'
operator: '=='
icon: mdi:lightbulb-auto-outline
state_display: Automations are off.
styles:
icon:
- color: red - value: 'on'
operator: '=='
icon: mdi:lightbulb-auto
state_display: Automations are on.
styles:
icon:
- color: green```
Thanks guys! I will give them a try!
@quick depot If you're using the standard Masonry layout, HA handles the card placement automatically based on the width of the browser and if the sidebar is shown (up to 4 columns). If you want more control over placement, you'll need to incorporate some layout-type cards such as horizontal, vertical, and grid. For some additional options and functionality, consider the Layout Card.
okies
Hi, how do I go abouts truncating/edit the last_changed/last_updated string?
I want to shorten 10 minutes ago state to 10 mins ago for example
What card are you trying to use?
Tile card
The short answer is you probably can't. However, you might be able to use card_mod. Take a look at this thread in the forum. Then, the hard part is going to be converting the last_changed/_updated timestamp into something readable using Jinja. (I have an example that might be useable.)
I don't mind using another card with card_mod if it's achievable, but if it's took 'hacky', then I rather just avoid. I was thinking it was just the case of editing a HA config file to it applies everywhere, is this not the case?
When it comes to customizing cards or trying to get them to do something they weren't designed for, things can take a "hacky" route. But, once it is done, it usually works well. This is something that I made using a mushroom-template-card which is essentially the same as what you're wanting to make with the Tile card.
Ah yes, would you mind sharing the code please, thanks?
When it comes to customizing cards or
@nimble ivy I converted your message into a file since it's above 15 lines :+1:
Hey - I am trying to change the tap-action depending on state, but I can't seem to get this to work. Can someone point me in the right direction?
I am using a custom:mushroom-template-card
I am trying to perform an action on Proxmox which uses buttons, when I press
^^ Reposting above so can thread
hey guys, what are some good graph related cards that people use? i've seen mini graphs card and apexcharts card but neither of them do what i want, so was hoping for some other options if possible
hi, is there any good way to pick exactly which user(s) can see a specific dashboard?
essentially I want to create a single user that can view exactly one dashboard (to be used on a tablet display)
@sonic rapids I use Kiosk Mode for my tablet user's dashboard. With it, I hide the header, sidebar, menu, overflow, account, search, and assistant button (essentially restricting the tablet user's access, relatively speaking). These settings can be assigned per user so, for example, the tablet dashboard won't show the tablet user everything I listed above but will show my user everything. When you log in with the tablet user, you can set the default dashboard for that device, although I just set the Start URL in Fully Kiosk Browser to go directly to the dashboard designed for the tablets.
Browser Mod is another option that has some different capabilities. (Both options can be used together. I use KM for per user settings and BM for popups and notifications to a specific device.)
@tribal galleon thanks, I'll take a look at that as an option. do you hide the dashboard from your other user somehow?
Not specifically. My user is primarily used on the computer where I edit the dashboard so I want to be able to get to it easily. If you don't want other users to easily see the other dashboard, you can set it to not be shown in the sidebar. (Settings > Dashboards > then pick the dashboard)
so this one is kind of odd, i have a DMX moving head that i have integrated into HA (through esphome). currently i just have number inputs for pan and tilt but that is kind of clunky. does anyone know of a way (either within HA or using a HACS addon) to get a better input ui for X/Y position (all my googling is just stuff about xy colour space)?
@sudden lotus Do you have the input numbers configured for display mode of an input field or a slider. Sliders might be more friendly if you're using the input field.
You could create up/down/left/right buttons that increase/decrease the input number values.
i am using sliders but since the movment range is so large its still quite sensetive
ill try the buttons, thats a good idea
would still like to find an xy type input though (im thinking something like a rectangle that you can move a point in and it outputs the x and y values, like those colour picker rectangles)
is there no increment service for actual number entities? only input helpers?
That part might be a bit difficult. The closest thing I've seen to something like that is a touchpad feature in custom:android-tv-card, but I do not know what its capabilities are or if it can accommodate something like what you're trying to do. HomeAssistant-Touchpad-Card is similiar but like the other one is designed to just be a remote control but this one is for Samsung TVs.
It seems that number can only set_value. Maybe you can incorporate some JS or Jinja to look at the current value, do some math, and return the new value to set.
yeah, thats what ill have to do but i dont think i can do templating in the call service option of a button
and thanks for the links, ill have a look
Maybe not with the stock button card but the custom:button-card can do it. In fact, there was a discussion about that a little bit ago. https://discord.com/channels/330944238910963714/1177354018410999828
You can just call a script and do it there
that android tv card actually workes really well for this
it lets you set custom actions for the swipe directions
dosnt work on web and is a relative instead of absolut control but it works
i ended up just making 2 helpers and 2 simple node red flows to map them to the actual number entities
and it cant do diaganal unfortunatly
hi can anyone point me in the right direction to resolve this large banner issue?
as long as we can not add a dynamic entity state filter to auto-entities (https://github.com/thomasloven/lovelace-auto-entities/issues/399) I would apreciate anyone have a look at https://community.home-assistant.io/t/card-mod-add-css-styles-to-any-lovelace-card/120744/5402?u=mariusthvdb, to see if we can add that card_mod to a template filter...
I've tried all options known to me, and cant make it happen without hard coding either the state filter or the entities....
may i ask what do you guys do with these i really like the look of them but i find the room cards way more useful and never use these, except for a blue monday
Hmm I've not seen that one before. Are you doing a lot of card mod stuff or custom cards, or is that stock HA?
Usually redirections to other pages
I always put most used stuff on the main page with links to less used things inside nested views
by nested views do you mean subviews? or like that you go to a different page and then a back button to the previous page like a web browser
Can you move card or object inside card dynamically? For example depending on sensor value.
I haven't seen that before and I do a bunch of custom cards and card mod.
@quasi siren does it look like that only when you're editing the dashboard or all the time?
Hi there! Does anyone know of a (custom) card that can show a camera feed, with the possibility to change the camera feed to another camera by clicking the sides of the image? Just like a slideshow of images??? Would love to find a way to do this!!!
hi, does anyone know if there's a way to always pick dark mode for a particular user?
I'm using kiosk mode for a dashboard and would like it to be dark themed
I guess you could duplicate the dashboard and only show it with a dark theme for a specific user...
oh can you force a dashboard to be dark? that would be okay for me
I think you could opt for a dark theme, right?
https://www.home-assistant.io/dashboards/dashboards/
I found reference to theme: dark-mode but that didn't seem to work
I think you have to add a theme called dark-mode, so unless you install the theme it won't work. I don't think it refers to the dark mode of your browser.
ah 😅
hmm is there a way to create at theme that only uses reuses the default dark mode?
feels like an awful kludge but I don't see any options to do what I want (use dark mode for a particular dashboard all the time)
I though this radio button was to always have it in dark mode? does it not work for you?
all the time, I might have to try to drop custom cards to find 😕
Does anyone use swipeable cards?
What happens when you go to dashboards and create a new dashboard? (HA will create an auto generating overview (default) dashboard.)
I used to, but I read it is not maintained anymore?
You can always try restart in safe mode.
apparently you're not the only one
Hey at all
i have a little problem with free space from my sidebar
can any help me ?
I have installed the " Custom Sidebar Card"
Okay. That's sad. Swipeable Cards would be good
I'm sure I did it in a previous life, but what's the easiest way to "expose" the inner card, or the inner attributes of an entity to the frontend? what I mean by that is here's an entity card and media player card for my Onkyo, and then the inner card, with all the attribute details. I specifically would love to have that sources dropdown, and the volume on the main card
That's called a 'more info' dialog
Anybody been able to use the auto-filter card to pull a list of entities to turn into chips using the mushroom-chips-card?
alright, and can I / how do I get some of those bits and pieces on the not-that/ "in front" card? again, specifically the sources and volume control?
did you try mini media player from Hacs?
LOL perfect! everything I want for the default view is its default settings! thank you thank you
that one is a user preference per browser unfortunately. doesn't work with kiosk afaik. if only they had per user settings
You can set your dashboard through a call service. Could that work?
oh? let me look, which service is it
Thinks its called set theme
ah that one. it sets it for everyone. not quite what I need unfortunately
Sorry 😂 I went to the wrong place twice 🤦♂️
trying t find a replacement for the core input_number slider,. Not only because the current slider is practically useless (on mobile), but mainly because I want to template the icon and icon color (eg to reflect the volume level). What are you all using?
could not find a direct solution in the core Tile card yet, (nor the mushroom equivalent). And the button-slider card seems not updated anymore.
currently I do this with custom-ui, but i am trying to replace that... not simple, especially in a glob though hat might be done in a decluttering card
guess I am basically looking for smt like this, but then template the icon and color
@graceful ember I converted your message into a file since it's above 15 lines :+1:
Why does every tutorial have this menu in HACS? Is that by default?
Because that is the HACS menu.
Then there is something wrong with mine ig...
Or I installed it wrong
hmm looks like my frontend version is outdated?
How are you running Home Assistant?
OS
Not sure why you're looks like that. But you seem to be running a newer front end version.
hmm well, it functions ig...
I think it is because you might have experimental features turned on. https://experimental.hacs.xyz/
Hmm you are right, it was on. But, didn't resolve the issue 🤔
Restarted, cleared cache.
Confirmed. I just enabled and restarted though I had to load in another browser. (Haven't cleared cache yet in original browser.)
ah Heh, in another browser it now indeed works.
Probably have to restart browser to get everything to click into place.
another question, I can't seem to find lovelace-ui.yaml
Thnx
Hi, I am too stupid to figure out how to change the background color of a dashboard. Or how to create a new theme whith the color I want...
ex:
frontend:
themes: !include_dir_merge_named themes
themes:
HomeA:
background-color: "#293445"
it just resets to white.
Thanks!
Hey there!
We just had a baby so I’ve been using baby buddy for tracking feeding and diaper changes. I’ve got a drop down helper and an automation to control what information should be input into baby buddy based on the dropdown helper.
I’ve been struggling getting the browser popup to control which dropdown selection to make. I tried to use the code from the installation page for the browser pop up for the vacuum as an example, but I’m stuck now.
I know there are other methods that I can do this, but I like the way this looks and so does my wife, so I’m trying to get this way to work.
Anyone able to help on how I can get this to work? Happy to share my code, just didn't want to spam the chat with it right off the bat.
There might be an easier way, but if uou don’t get a better response, you can use custom button card together with my-slider from Hacs to create just that.
Yes I did test ebedded cards inside button but was looking for more straightforward 😉
My problem with my cards in the home assistant is not loading in, and I am not showing up. When I tried to pick a card.
Btw my-slider ? Can’t find that
hello, in the tile card, is it possible to add text?
something like "temp: 20.8 x Off x Target 24
thx, will check. btw this is what can be done with template-entity-row, which unfortunately doesnt show the slider...https://github.com/thomasloven/lovelace-template-entity-row/issues/36#issue-700857719
would be perfect if it showed that...
and I dont think we an template the icon easily on slider-entity-row..
making that also close
ok so it seems using a custom card is not the solution you accept? Can't help you then unfortunately :/
no? why would you say that? Id prefer a core card with some card_mods, but as Ive tried to writeup there, we cant, so custom is the way to proceed.
Does anyone know a easy way to translate the results from weather.forcast to Norwegian ? I know I can make a sensor with "if state cloudy". Then translate.. but home assistant is already translating it when using the standard card (front end). So I was hoping for an easier way?
Ah okey 👍🏻. I can help with making a custom button card like your mushroom-example above if you want?
Sure, please do ! Thx. Any idea /example taking me out of my current comfort zone is appreciated ,-)
now I'm just using a helper for easy demonstration, but you could template jsut about anyhthing here pretty easily for your needs. Is this what you had in mind?
@zenith stag As I was scrolling through, I saw your conversation with Marius. I thought about your slider card/Mushroom template combination would be a solution. Looks like you've already got that working. 👍
yeah, but I also don't like relying on "3rd party " solutions such as this. But I also guess this is Home Assistans strength 🙂
nice indeed. Id want the icon to change color too according to the same thresholds, but supposed that is quite an easy task. let me have a go at that. please drop the yaml in a file?
nice indeed. Id want the icon to change
Hi.
I have a weather card with a background image matching the weather... but is it possible to change the opacity only for the background? and maby add a gradiant from top to buttom of the image?
can you share the full yaml?
Sure, just need to put kiddo to bed 🙂 back in 5
@hard blaze I converted your message into a file since it's above 15 lines :+1:
I kind of want* sorry for that miss spell there
I actaully have not found a way to use opacity on the background image. Perhaps cad_mod can help out.... But adding a gradient is easy
ah ok.
- background: linear-gradient(0deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0) 100%), center / cover no-repeat url("/local/ic/weather_icons/' + entity.attributes.desc +
'.jpg")
interesting, i will test it out. thanks
the gradient is working, but now the image is gone
Howdy! Anyone using Bubble Pop-up? I'm about to abandon the Horizontal buttons stacks and was thinking of using Mushroom Card Entity Cards on my home screen to navigate between rooms instead. But, how can I navigate to #kitchen #livingroom etc as setup in my Bubble Cards?
I guess, either it won't work - or the answer is to simple to even find, and my brain is failing me massivley here haha
tap_action:
action: navigate
navigation_path: '#shopping'
thats one way of navigating
isnt it just a matter of adding this to any card you want?
tap_action:
action: navigate
navigation_path: '#kitchen'
Yeah that's what I'm messing with, 1 sec, gotta look for typos
For some reason, i cant get that picture showing with that code... but the gradiant worked as a charm! i will test som more! 🙂
Cheers, works, didn't work in the browser 😐 reloaded, works now
try deleting those other rows for the background-image. And background var contrast
Hey all, I am setting up Google Cast to my Google Home Hub to display dashboards. I am able to connect to my Home Assistant instance through local ip and external ip (https://servernamehere.duckdns.org) both on home network and cellular. When using cast.home-assistant.io, I can successfully log in and use my authenticator, however the website returns the error "Unable to Connect". Any ideas?
yeah, tried but no change
try changing your url to something less complicated first 🙂 Btw, that's a very special url. Had no idea you could do that....
me neighter, found it on youtube ehehe
but the image is actually working the way its written.. but ok 🙂 I will google and play around with it a bit more.
Thank you for the gradiant tip!
let me know if you figure it out 🙂
Hi, my minimalist UI is completely broken after updating home assistant to 11. I think it's cause by button-card problems. Anyone has any idea how to fix this?
I get a lot of this typeerrors in the console.
ButtonCardJSTemplateError: TypeError: Cannot read properties of undefined (reading 'match') in 'var number = hass.resources[hass['language']]["ui.duration.hour"];
Have searched and couldn't find anything
did you update custom button card?
yes, just updated everything
hmm it seems to be a problem with the room card template
There are multiple new releases for minimalist UI that fixed those issues
hi all, is there a way to use a custom font (from google) in a state-label element of a picture-elements card without the need to install card-mod?
yes
type: picture-elements
elements:
- type: state-label
entity: sensor.time
style:
top: 62%
left: 80%
color: black
font-family: Montserrat
thanks!
...just don't forget to add the font as a resource 😅
Hi all, I know this is a long-shot but does anyone know of a solution to 'summarize' text? I have pictures provided with a sizeable piece of text as explanation and no title ... I cannot show all of that.
ChatGPT maybe?
How do I make input number in the dashboard show as a slider and not like that? https://i.imgur.com/EekkQcT.png
I've added it using - type: entity
Use an entities card rather than an entity card.
Thank you 🙂
im trying to get a good looking dashboard, but when i use vertical or horizontal stacks, they never are hidden when they are empty...
i have this layout
given a lot of these are conditionals, this is how it looks when its not being edited
whitespace
whitespace everywhere
how can i fix this?
Hey all, when I do a fresh HA installation via docker I have no access to the network settings. The page is just blank. I tried many different settings in my docker-compose file that could be connected to networking and also different images for the container but sadly that brought no success. Also there are no errors in the logs. Has any of you had a similar problem or might have a idea what could be the reason why the network setting don't load?
hi, is there a way to have this temperature setting for the light as separate button/slider? currently i have stock lovelace card for light that i need hold to get to that setting. would be nice to have access without need to hold
Is it possible to have an horizontal stack take an entire "row" at the top of the dashboard? Currently I have cards next to it and I don't want that
If you use 'panel' for the dashboard, yes, so my advice would be to add vertical stack and underneath horizontal stack
I've tried using panel however it messes it up on small displays. It was great on my pc though
If I just put everything under a vertical stack it works fine on both PC and mobile however that way I lose the functionality of HA putting cards next to each other when screen estate allows. It just stacks everything vertically which of course makes sense and is fine for mobile but looks bad on PC
Then combine this by e.g. 3 columns, each column has a single card with (say) 3 button cards...they will show next to one another on bigger screens but underneath on mobile?
If you use vertical layout with 'break-card' you can also nicely place them in each column
Thanks! I'll look into it
hi all, a very quick question, and I think the answer is "no" (because I can't find it in the documentation), but is there a way to have a standard entity card navigate to another dashboard on click?
I tried adding this to the YAML but it ignores it, so I assume it can't be done
tap_action:
action: navigate
navigation_path: /dashboard-traffic
just bumping this
looks like it got burried
just dont want that white space when things rent rendered by conditionals
Hello. I have a module that regularly feeds HA with current power consumption. The default graph is quite unpleasant because value often vary significantly.
Is there a way of having values averaged to some extent ?
You can use the filter integration to reduce the noise, then track that entity instead.
thanks I'll look into that
Hi guys. Anyone gotten a background picture and gradiant to work together?
I have tried several things, i do get Gradiant to work, and GIF background image.. bot combined i cant get it to work.
What i have treid:
1:
- background-image: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%,rgba(0,0,0,0.7) 100%), url("/local/images/sunny.gif");
2: - background: url("IMAGE_URL") no-repeat left top, linear-gradient(#eb01a5, #d13531);
did you try what I sent yesterday? That works perfectly for me
- background: linear-gradient(to bottom, rgba(0,0,0,0.9) 0%,rgba(0,0,0,0.1) 100%), center / cover url("/local/images/sunny.gif")
I forgot to test 🫢🫣😬 I will try!
You genius. tnnks it works 🙂
Just need to find that way to add the code to find the right gif )
english please
was that pointed at me? @tacit cave ?
oh ok 🙂
Hi Petro, do you know if it exists something simliar for binary sensors? What I'd like to achieve is a new binary sensor that stays ON if the underlying binary sensors goes OFF for less than 1 minute
You can make a template binary_sensor with a delay_off
thanks!
i have a denon receiver
is there a better way to show it on a card?
this is the options
something like that would be much better as a card
being able to choose sound and volume and source directly on the card
you'll just need to install a custom card.
ok, any to recommend for this use?
I have an entity that gets updated every minute with an integer value. Using the API, I would like to know the avrage value over the past n minutes. Is this doable, if so, do you have any hints as how I can get the poast n values ? thanks
What is "the API". REST API? Look at api/history/period
https://developers.home-assistant.io/docs/api/rest/
thanks
Hello. I want to ask if there is a way to put the media library window (for selecting a song of a playlist, artists, albums etc.) into a button of a custom card. Like is there some command to open that window?
Thanks.
https://imgur.com/a/C3kYgTJ
Hi All! Anyone happen to be familiar with the issue of sidebar-card (https://github.com/DBuit/sidebar-card) causing the top menu to overlay content when overridden to show?
is there an open issue?
i haven't been able to find one 😦
then I suggest filing one
didn't want to if i was overlooking a fix, etc.
https://github.com/DBuit/sidebar-card/issues/74 being more breaking & pending for over a year doesn't give me much hope for that route either
You just want a button that opens the media explorer, am I understanding that right? I think the navigate action of tap_action should be able to handle that.
Hi @vast crane. Not exactly, I want that it opens this window, but not to open the media explorer. It's because I want a window in front of the lovelace.
https://imgur.com/a/S20GSio
see if this works for you. It does not for me
https://community.home-assistant.io/t/launch-media-browser-dialog/325625/4
Thanks!! I will try this in the afternoon, but seems its what I was searching for.
Hello everyone, I’m trying to understand if it is possible, when the component is configuring the options (config_flow.py) to have two columns, basically as the cards configure. I’m building a component that is a camera and I have some options to change the images settings (rotating, cropping and so on) I would like to give to the user the possibility to see the results of the new setting in real time.. couldn’t found documentation about how to manage this part., I suppose it could be done by a typescript or simply from strings.json.. but I would really appreciate if someone here could let me know if it’s possible how or not possible at all.
#devs_frontend-archived is probably a better place for that question.
finally found a way to replace my custom-ui entity_picture templates with card_mod.... a bit more involved than the simpler icon/icon_color templates, because need to not show an icon too.. https://community.home-assistant.io/t/card-mod-add-css-styles-to-any-lovelace-card/120744/5412?u=mariusthvdb easy enough though to re-use with c&p
Hi, i have a test instance of HA installed, now i want to setup the productive ones, starting to install all the integrations.
For Dashboard i want to use Mushroom, but the Frentend Integration didn't load after installing with hacs.
As i am faitly new to ha, how can i see why it was not been loaded and to solve this?
OK, now i see, that also in my Test instance a lot of the frontend integrations couldn't loaded. But at least there the dashboard is already finished.
i didn't work on test for some time, was there something changing last months?
in test instance i got this fixed updating HACS, but in prod i am already on latest version... thats anoying...
lol, redownload just fixed that
Having a strange issue where I can't see devices if I log into the UI from anything other than localhost. I'm using the same user, but I seem to have different access when logging in from another machine on the LAN. Checking my user profile doesn't seem to show anything that would apply.
hi. want to make a button that opens a link in the default browser/redirects you if you are on home assistant web. how should i do that
@compact pebble I converted your message into a file since it's above 15 lines :+1:
thanks!
有人吗
homeassistant的前端目录在哪里啊
Where is the directory structure of HomeAssistant's front directory?
please What is the directory structure of homeassistant?
homeassistant Which directory are the front-end files in?
1
It's probably better if you start by explaining what you are trying to do.
HI Thomas, would it be possible to add an entity as a state filter in auto-entities? it would make the card even more powerful. this is what I mean (https://www.home-assistant.io/docs/automation/trigger/#numeric-state-trigger)
Number helpers (input_number entities), number and sensor entities that contain a numeric value, can be used in the above and below thresholds, making the trigger more dynamic,
not sure if you're still developing the card...this would be awesome
is it possible to have more than 1 entity control the state of the icon in a custom button-card?
@fading musk I converted your message into a file since it's above 15 lines :+1:
or rather can I assign more than 1 entity to a button?
what I want is for the button to reflect if the fan is on or off and also check if a switch is on
I'm pretty sure you can use "and" in a template, so I think the answer is yes
so where do I add in the additional entities?
in the template
icon: >
[[[ your template ]]]
sorry I dont get you.
type: custom:button-card entity: fan.hall_fan show_state: true
in my case, do I add them under entity?
here is a copy of one of the UI Minimalist cards. It seems to be using two conditions. So I think you can copy and alter this:
- grid-template-areas: >
[[[
if(variables.ulm_card_esh_welcome_collapse && states[variables.ulm_card_esh_welcome_collapse].state == 'on'){
return "\'item1\' \'item2\' ";
} else {
return "\'item1\' \'item2\' \'item3\'";
}
]]]
well you add the template where you want it to change something. So icon, name, label, background..... where ever
I still dont really know how to use [[[ and ]]] brackets. is there a good reference for this?
I would start with the cards documentation 🙂
so what exactly do you want to change in the card?
for my case, I want to do this- if entity1 is on and entity 2 is on>icon green, if entity 1 is off and entity 2 is on> icon red, if entity 2 is off> icon white
this is because my fan relies on an external switch to be turned on
so when that switch is turned off I can't control the fan
I'll have a look
thank you!
you dont have a third state for the fan though? Like, On, Off, Unavailable?
I don't seem to see that state in home assistant. its only on or off
hmm thats wierd. So if you unplug the fan it is just "off"?
Not sure which way is the easiest, but another alternative is to create a new sensor to handle the states. Then you don't have to add the template in the card. Either way, requires some yaml though
how do I do this?
this sensor will detect if the switch is unavailable?
or non responsive?
well you tell the switch to have the state "unavailable" if the switch is off
I'll try and see if a template works first for you. I'm no expert so someone else here might jump in and give a better solution though 😉
ok sounds good! thank you!
whats is this [[[ and ]]] brackets used for in home assistant?
nice! can you share the code please?
@zenith stag I converted your message into a file since it's above 15 lines :+1:
thanks @zenith stag 🙏
perhaps it's possible to use "or" in there, to avoid having return: "red"; twice, I don't know. But this seems to work at least
I modified and this is my code:
@fading musk I converted your message into a file since it's above 15 lines :+1:
this works the way I want it to😀
that's great! What does this do/mean?
operator: '=='
its for state
Who is a front end genius
do you need it? I mean, since you have - value: 'off' above
hmm.. not sure. have to check it out.
yeah. it works with the operator! thanks for pointing it out
I wonder where you would use it otherwise? I have never so it's new to me 🙂
How would i add two switches to my front end under one card
@zenith stag I converted your message into a file since it's above 15 lines :+1:
type: entities
entities:
- switch.first_switch
- switch.second_switch```
Is it possible to display remote services in the side menu? I've moved Frigate to a separate machine but I would like to be able to access the UI from the HA menu like I was before
Can't see that anyone answered your question yet. [[[ and ]]] are used by some custom cards to inject custom javascript. It's not a Home Assistant core feature.
with that mindset you won't get far in Home Assistant unfortunatey. Also there are too many variables to even have someone do the work for you. Things change all the time so you want/need to have full control yourself and know what is going on with your setup
Let's start with what you actually want to do, and I'm sure we can solve this together.
Just "add two switches to my frontend under one card" is very unclear, because "add", "switches", "my frontend", "under one" and "card" can mean several very different things which all change the answer completely.
Can you explain it more clearly? Maybe a picture?
I understand ty guys
Ok so, I've got a bunch of switches, hue bulbs, energy monitoring plugs, etc
Would love to have them seperated into their desired areas, and with the energy monitoring plugs, have them show how long they've been above X amount of power to track time the washing machine has been on
Just install mushroom cards and use the UI to manually crate all that
its very easy w/ mushroom cards
and it looks good
oh and, if possible, I'm on Octopus agile, so track how much it costs to run the dryer & washing machine (energy monitoring plugs)
all of what your describing after your frontend woes is backend stuff
i.e. other integrations
like utility_meter, history_stats, and stats
gotcha, just wanna make it clear I am not very capable with this stuff
But paying someone to do it will not help to learn it - and you might still not like it
||Too many "it"s||
gotcha
Not to be the bearer of bad news, but if you don't try to learn HA, you'll end up very jaded against it and dislike it. Then ultimately end up purchasing something else. So, if you aren't interested in doing this, you should just purchase something else from the start.
I managed to set and learn everything previously
Will just learn as I go
Is Mushroom cards the way to go?
If you don't want to learn anything complicated but want a nice looking UI, it's the way to go.
that or just use tile card everywhere
if you're using the auto generated dashboard, change the visibility. click the entity and make it hidden
if you manage your own UI, just don't include it
Yes I see Visible
Ok then
But it says it will not be shown or included in an area or device
So that isn't disabling it of sorts, just removing from the dashboard?
ok
Apologies for the stupid questions
Again, this has all changed from the last time I used this
Previously it was just Hide from dashboard
it's the same concept, just in the UI
Thank you
@plush shadow I converted your message into a file since it's above 15 lines :+1:
nvm, I found an error on my configuration.yaml. probably causes that.
I will fix and see
yep. that fixes it. mb
The more-info for a manual alarm_control_panel shows states for vacation, night, etc. etc. How can I reduce the more info or the manual alarm_control_panel to have only e.g. disarmed and armed_away as potential states? My wife will never ever select the right one out of all possible ones, esp. as for the panels cards I can select the possible states.
The more-info will show all the states that the entity claims to support. If you don't ever need to use those extra modes, you can customize: the entity to change its supported_features to remove those other modes globally for that entity.
i'm using wallpanel and google cast to cast a lovelace dashboard to a google nest hub. I have wallpanel working well, rotating the background image periodically. but I wonder if -- to avoid panel burn-in, i can somehow get lovelace to also alternate the placement of the overlaying card. i dont know if this is really even a concern but, swapping card location every so often might be interesting.
Ah. Good hint/idea. I thought that, but thought as well, that I can set the wanted modes in the manual yaml alarm somehow. But didn't find this in the docs. Do you have an example how to remove e.g. vacation?
You'll probably have to read the code
supported features is just a series of numbers added together
e.g. 1 is turn_on/turn_off and 2 is brightness, so supported features would be 3
top of the file will have the numerical values that match the supported features
If the current supported_features is 63, you would change it to 31 to remove vacation mode. I didn't see anything documented in manual alarm_control_panel that lets you change the modes.
export const enum AlarmControlPanelEntityFeature {
ARM_HOME = 1,
ARM_AWAY = 2,
ARM_NIGHT = 4,
TRIGGER = 8,
ARM_CUSTOM_BYPASS = 16,
ARM_VACATION = 32,
}
ya that
just keep in mind that it will alter your functionality
if you want one just for your wife, but you maintain full control, make a template alarm
I recently added the Tesla custom integration which bring 59 entities. These entities do not contain the word tesla. I wanted to add thelm all to the dashboard but if I filter with "tesla" none is showing up. I do not really want to find thelm individually in the list (which contains hundreds of entities). Is there a way of adding those to the dashboard anyways ?
Is there an "add to dashboard" button on the integration/device page?
No, I don't see any
hmm ok i have wallpanel working and displaying a rotating oogle photos image as a background when i view it from a web browser, but when I cast the dashboard to my google nest hub i just see the card, not the image background.
i can cast the image as a card and it will rotate but it doesnt work as an image_background
Hi Peeps, not sure if just mine but my lovelace media card doesn;t show how far into the media the player is in now, itused to have at bottom how far along it was, is this just me?
hmm ok i have wallpanel working and
I have a script (python + cron) that downloads some images from some websites and puts them in ./www/ ... I've confirmed that the images themselves do change when the script runs. However, the images in Lovelace do not change. Is there a way to make that happen?
hey guys, does anyone have some good suggestions on front end graph options? apexchart card and mini graph card don't quite do what i want and i'm after other options
Depends what you want. I can usually do everything I want to with those two and one other: Sankey Chart. https://github.com/MindFreeze/ha-sankey-chart
i want something to monitor my power usage throughout the day with my solar
the thing i can't do in apexcharts is have the time start at midnight each day and only go up until now - with apexcharts it can go for a whole day but not from midnight to now, and for future times it just has it using the current value, which means when i'm generating a ton of solar, it looks like i'll generate it all through the night, which looks iffy
also i love the look of sankey charts but unfortunately i don't have anything that has energy monitoring yet, so it would be a bit of a boring chart 😛
one day though when i have more energy monitoring going on, i'll get that set up
You can do that. ```
span:
start: day
but it goes from midnight to midnight
i want it to go from midnight to 8:40pm for example
can someone help me with returns in an if statement?
[[[ if ((states['fan.hall_fan'].state == "on") & (states['switch.hall_fan_sw'].state == "on")){ return - color: - green - animation: - rotation_on 1s linear infinite } else if ((states['fan.hall_fan'].state == "on") & (states['switch.hall_fan_sw'].state == "off")){ return "white"; } else { return "white"; } ]]]
I want to be able to return the color and animation settings for icon
You will need to template both keys separately, but if both templates are equal you can pack them in a variable which outputs the template
I thought the same. But I think it might be easier if he just makes a new sensor instead that outputs on/off/unavailable and uses that as the card entity
custom button card?
Yes
then template both separately
So i will need an If statement for both color and animation?
Ok great. Thanks!
Hi I am following the info at https://design.home-assistant.io/#components/ha-alert but this code <ha-alert alert-type="success" dismissable>
This is an success alert — check it out!
</ha-alert>
does not work. I see the message "This is an success alert — check it out! " but no dismissable button on any device I have checked (windows ,iOS, linux). I am running the latest Home Assistant version. Do I need something else (add, frontend) to make this to work?
outside that, id expect
<ha-alert alert-type="success" dismissable>
This is an success alert — check it out!
</ha-alert>
to have the x
This is the same I wrote above. I tried your suggestion anyway but the result is the same
ok, then #devs_frontend-archived
how can i get toggles for the bottom 3 (so that they are the same as the top 2)?
HA draws them like that when it does not know the state of the entity. You would need to figure out why HA doesn't know if your light is on or off.
Are some of those entities lights while the others are switches? Or all they all classed as light entities?
Nvm, what @vast crane said is the more better lead and info.
No sure is this is the right channel, I am trying to control a Samsung TV with with an iTach Flex via Telnet (shell_command or command_line) and have the control part working but struggle with a button that would toggle the TV state based on the current state and display the state in the same button. Here is what I have so far:
https://pastebin.com/embed_js/mCs6J57c
Any direction pointers would be appreciated!
https://imgur.com/a/ki06zpa
somebody ever seen something like this?
waterfox, firefox fork
maybe check if it is this?
https://github.com/home-assistant/frontend/issues/17182#issuecomment-1623354040
does seem like maybe it got fixed in firefox 119?
Yes i just hope it gets to waterfox fast 😛 i really dig the slim tab/titlebar
is there any way to see the code behind a card like type: energy-devices-graph ? I want to do the same thing but for watts
yes it's all public on github.
https://github.com/home-assistant/frontend/blob/dev/src/panels/lovelace/cards/energy/hui-energy-devices-graph-card.ts
that doesn't mean it will necessarily be easy to replicate.
I'm sure there must be a custom card somewhere that can draw a bar graph of some entities if that's what you're looking for.
Would this be the right channel for creating a toggle button to control a TV with shell commands and display the TV state?
I have command_line device setup to toggle the TV power or could use shell_command to control the power but want the button to display the current status, which could be the media player power status or the power usage from another device/sensor. Is that possible? Basically want to have a button that displays the status of the tv and will send the commands to control it based on the status
I would checkout Template switch. It lets you create a toggle entity that can derive its on/off state from any number of sources, and lets you call any arbitrary services when you turn it on or off.
https://www.home-assistant.io/integrations/switch.template/
Then once you have this you can stick it in the frontend just like any other toggle.
I struggled with the value_template part looking at the other devices, I was trying to do some of that in the button/panel I created
https://pastebin.com/embed_js/mCs6J57c
#templates-archived can help you with writing a value_template
Is there a way to show an attribute of an entity that contains space ?
I can show attributes if the name of doesn’t contains space…
In an entity card… the code attribute is shown as expected… but not the End date attribute.
- entity: sensor.hydroqc_chalet_next_or_current_outage
type: attribute
attribute: code
- entity: sensor.hydroqc_chalet_next_or_current_outage
type: attribute
attribute: 'End date'
can an attribute really have a space in the key? every one I've ever seen has underscores as word separator
Well, when i list attributes from a particular entity, two of them have spaces…
go to developer-tools/states and look at the attributes
it might be getting translated or something
Oh good idea…
It says State attributes end_date… I believe I tried that, but maybe I tried End_date and not end_date
Working!! I tried End_date and didn’t try end_date… Nice hint for the states in dev tools, I’ll remember that one …
@brisk canopy I converted your message into a file since it's above 15 lines :+1:
Hey guys, i am trying to change the colour of the "secondary_info", just so i can see if a sensor hasn't been updating for a while. Since there are alot of sensors, it's more efficiant to see the red text while scrolling the list. I am trying this in a lovelace card but i can't get it to work. Does someone have an idea?
(tagging petro, too).
I actually worked on this a little bit last night. I didn't want to give the easy answer and tried to figure out how to make what you wanted work. Ultimately, I ended back at the easy (easier) answer.
I would take a different approach to this and use the custom:button-card's State feature. You can define different options for on and off. In the end, you really only need one IF statement: is the switch.hall_fan_sw entity on. (The State can handle the on/off for the icon color of green/white.) Basically, whatever you can apply to in the Styles, you can apply here.
type: custom:button-card
entity: light.hallway
state:
- value: 'on'
color: green
styles:
icon:
- animation: |
[[[
if (states["input_boolean.tester"].state == "on") return 'rotating 5s linear infinite alternate'
]]]
- value: 'off'
color: white```(At the end of the screen recording, the input_boolean.tester is turned on with the light off = no animation.)
So... I went back and looked at the original code and noticed I made a mistake. light off = white; light on, but switch off = white; light and switch on = green animated. So, like petro mentioned, you would have to template each. Just add this in the icon: section for on(removing the color: line). yaml - color: | [[[ if (states["input_boolean.tester"].state == "on") return 'green'; ]]]
You can still do it in the state: which could make it easier to add more styling to the on/off states. (My cards are subdued when they're off.)
My motion detector cards are the same way.
I need to add the same thing to my fan card. Now during the winter the fan is tucked away in the attic so either I hide the card all together or I add a third styling state as in the posts above
I have another state for when a motion detector state is unavailable. ```yaml
- value: unavailable
operator: '=='
icon: mdi:walk
color: rgb(255, 255, 0)
styles:
name:
- color: rgb(255, 255, 0)
- animation: blink 3s cubic-bezier(.2, 0, 1, 1) infinite```
I imagine that accompanied by an annoying klaxon
Is there a guide anywhere around completely theming HA?
Intruder Alert!!!
Do you mean something to go along with this:
Or this:
Wait, I forgot about this one:

Greetings... I renamed a 'helper' entity and changed it's ID and now it shows the old name in my cards etc.
Also.. I need an Icon for charging a boat.
🙂
is there any way to edit the home assistant UI without forking it?
You could make an entirely new one? Or are you actually looking for themes? https://www.home-assistant.io/integrations/frontend/#defining-themes
I'm actually trying to edit the text on top of the sidebar
Anyone who can help my insert this template in te custom button card? I'm still struggling to convert these things.... ^^
{{ ['Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday'][now().weekday()] }}
The below just renders the whole string, so not correct.
- type: custom:button-card
name: >
{% ['Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday'][now().weekday()] %}
You can do that with the Favicon Changer integration on HACS
https://github.com/thomasloven/hass-favicon
You can't use jinja in custom:button-card
I know, but my question was how to convert it. Or can't I? Do I need to make a template sensor first to fetch the data from?
button card has a helper that can easily output the current day
- type: custom:button-card
name: "[[[ return helpers.formatDateWeekday(date); ]]]"
It's wierd. I have been using custom button card almost exclusively for the past year and have been through the documentation on a weekly basis. But there is always something new. Thanks for pointing it out 😄
That is only added with the 4.x updates
The full template needed is btw:
[[[
const date = Date.now()
return helpers.formatDateWeekday(date);
]]]
thanks! You wouldn't happen to know how to display anoter day? tomorrow for example
const today = new Date()
const tomorrow = new Date(today)
let date = tomorrow.setDate(tomorrow.getDate() + 1)
Basically just searching google for javascript datetime calculations and you will find what your need
hmm that returned blank for me. I guess I could try and dive a little deeper into this, but I wonder if just making a template sensor to pull the attributes from would be better.
You should also add the return line with the helper to the code
right, that solved it, thanks 😛
another topic still bothering me: I can'
Hello, I'm not a developer
How can I apply the theme that I applied but only the color changes?
it isnt change graph..etc
is there a easy way to set the background color for a markdown card without using card-modder?
ah that could be a solution, thanks
exactly what i needed! thanks
Is there anyone who can help me install UI Lovelace Minimalist please?
I've followed the installation instructions but the sample dashboard isn't working
Moon integration - wrong translation to German of “waning_gibbous” as “Drittes Viertel”
What is exactly not working(image?)? and which instructions did you follow?
I installed from the official docs. I think I mostly figured out that I needed to add resources to the dashboard area in the UI in order to get the custom cards working. But clicking on them didn't make anything pop up etc, so I'm sure I'm missing something.
So the resources are added here? And are downloaded from HACS?
That's right... There were no installation instructions about adding those to the resources section, so I wasn't actually sure what I needed to add. I didn't have browser_mod for example
That's correct because that part of the instructions should already be covered by the frontend card and/or HACS documentation
Sure... I guess that when it's offering to bundle those resources I just expected some instructions about what needs to be added. The only thing I installed via HACS was the UI Lovelace Minimalist, and in the config asked it to include the custom cards.
A note in the docs about what else you actually need to do to get it working would be good 🙂
This isn't really the case is all. You have to do a bunch of configuration to make them work 🙂
It's the case, basically there are 2 options.
- add all frontend requirements manually and check its resources
- click the checkbox in the integration options and let the integration handle downloading all these frontend requirements
But generally spoken it's better to do it manually as you can control the version of the resources yourself.
I had the checkbox checked. But I still had to go and manually add everything into the resources section in Dashboards
We are making progress!
No way is this HA? 😮
Yes way!
@polar kelp is it possible to add additional rules in the media queries of layout-card? I have not seen any examples. I would for example like this layout to be for both 1200px screens but also mobile devices in landscape more.
#desktop
"(min-width: 1200px)":
grid-template-columns: repeat(8, 1fr)
grid-template-rows: 80px repeat(4, min-content)
grid-gap: .5rem
margin: 0 40%
grid-template-areas: |
Try or
iOS app slider disappear, home assistant latest version. Anyone knows the issue?
will be fixed in 2023.12 next week.
Any way to adjust the kelvin range that’s displayed for a given light? The light is only capable of producing 2700k through 6500k and the slider in HA is showing 2000k through 6500k, which is causing the incorrect color temperature to be displayed
Use a panel view with one of these? https://www.home-assistant.io/dashboards/iframe/
that's been my approach for a few tabs, but unfortunately doesn't work in this case.
my original plan was to do the same thing to "integrate" overseerr into homeassistant, but there's a known issue where it won't get past the login page when ran in an iframe. i checked my firefox configs, disabled sameSite, but still no luck.
so my workaround was going to be to just link it to the overseerr ip and have it open in a new page
Just out of curiosity, what reason would you have to integrate overseerr into HA? I’ve tried finding a reason to integrate that stuff with HA but could never come up with anything that made sense
easier to have everything in one place, especially when my girlfriend uses homeassistant as well
i tied blue iris and everything else we use into the ha dashboard for that reason
just convenience
what i've done until now is had a dashboard page running masonry webpage cards side by side. so i'd have sonarr - radarr - lidarr - sabnzbd in 4 panels
but now that i'm running overseer, i'd like to just do a one page web card with overseer in it
I expect the sliders are getting their information from the light entity attributes, you can confirm this by reviewing in developer-tools/states.
The quick & hacky fix is to use customize to override the incorrect attributes. The better fix is to work with whoever maintains your integration to figure out why it is reporting wrong and get it fixed for everyone.
It’s Tuya, so I doubt that would go anywhere lol
Any tutorial or instructions for the quick & hacky fix?
you can override min_color_temp_kelvin & max_color_temp_kelvin
like this?
Looking for support with making some changes via css in my dashboard. I've been able to change my background as I wanted however I want to change the background color of knife/fork icon as well as adjust the "Kitchen" font size.
so this didnt really fix the issue, it did set the minimum to what i want, but its still displaying the incorrect temp (something close to 3500-4000 when i have it set to 2700). before, when i had it set to 2000, it was displaying roughly 2700 temp, so i guess im looking for a way to offset the temp by 700?
I see. you could probably do it with a template light, but that's a bit advanced
I know this gets asked a lot, but anyone have tips for getting a dashboard to fit into a 1080p display? Currently I have a grid with one column holding three horizontal cards, but I can only see like 1 & 1/2 rows
is there a global css file in homeassistant? as opposed to just card-mod css?
I absolutly hate spending 2 hours doing trial and error trying to make a card layout work just so it fits on a screen. There really has to be a better way. Sorry, i know complaining doesnt help anyone, but I'm really frustrated and I have been using lovelace for a long time
Layout Card
Themes would be the closest thing I believe
ah yes that worked, just was not sure how to write it. Thanks 🙂
mediaquery:
#phone
"(max-width: 700px) and (orientation: portrait)":
Hello guys, I am trying to make a button that shows me the pop-up window when I click on it, so that other options appear inside it, but when I click, only the pop-up window appears without any options.
type: button
name: lights
icon: mdi:air-conditioner
tap_action:
action: call-service
service: browser_mod.popup
service_data:
title: Living Room AC
content:
type: entities
entities:
light.guests_room_switch_1
switch.d_lmzr_switch_1
you don't seem to have any entities in the pop-up. You light and switch are on the same level as the button
It's hard to tell without formatting
To format your text as code, enter three backticks on the first line, press Enter for a new line, paste your code, press Enter again for another new line, and lastly three more backticks.
```yaml
example: here
```
Don't forget you can edit your post rather than repeatedly posting the same thing.
Card-mod-theme to be more specific and there is a dedicated topic in the community for it
Something with ‘supercharge your themes….’
I have a quick question:
Is it possible to add a background color to a vertical-stack card?
I managed to edit each button-card inside the stack card, but i need the background to cover the whole vertical stack card
I use the following on the button card:
card:
- background: var(--base)
this though do not work on the stack card, or im doing it wrong.
But you don’t need to include card mod for everything. Pr what did you mean?
Use mod-card for that
Hello, how can i enable the box and slider option on the number helper?
https://i.ibb.co/52JMHK8/Screenshot-2023-12-03-000234.jpg
Enable Advanced Mode in your profile settings, then it will show up on that screen
Big thanks 🙏
I've had that setting turned on for years and never actually knew what it did. 😆
hi all, does anyone know how i can achieve this ( im using grid custom layout)
shrink the middle one so it doesnt keep in line with the larger one on the left
figured it out, added another row on left side with same name so it spreads across 2
Hi, how can I remove these things on the right side of the topbar? And how can I center the icons on the left?
when doing Floorplan, I am unable to separate the overlay layers to separate out the lights. How do I change the coding to make it show them separate?
Hi All, I am trying to integrate all my docker container information into home assistant to know their status. I currently got couple of sensors set up for each docker on if they are running, their uptime and if there is any updates. I want to create a custom button-card for each docker and display states for all these docker entities in the same button. I also want the button to link to the internal url to the services like plex. Not sure how to show all these information in one button?
@unborn venture I converted your message into a file since it's above 15 lines :+1:
Can someone tell me why this icon "variables.ulm_card_thermostat_cale_icon_final" doesnt show in the dashboard?
Thanks.
in a custom:button-card I am trying to display the value of number from ISY variable and prefix and append it with static text. Like OFF in: ##
`state:
- operator: template
value: |
[[[ return (states['number.timer_bedroom_tv_sleep_60'].state != '0' ) ]]]
color: rgb(59,246,134)
spin: false
name: >
[[[ return (states['number.timer_bedroom_tv_sleep_60'].state ) ]]]
icon: mdi:clock`
I use Kiosk Mode to hide those buttons. Settings can be applied per user so, for example, my tablet user has the header and sidebar hidden but my personal user can see it.
As far as centering, I'm not sure you can. There was a Custom Header available that gave some options but it is no longer active and there does not appear to be an recent forks of the project.
Like this?
name: >
[[[
return "Espresso - " + states['switch.buzz'].attributes.coffee_temp + "F";
]]]
Hi how can i edit the code so correct bins show up only with when the right day come?
At the moment its counting down and then change for the correct bin collor.
I want to create schedule so every week on Sunday info display which bin color to put outisde.
thanks in advance
- type: custom:mushroom-template-card
primary: >-
{% set days = ((state_attr('calendar.red', 'start_time') |
as_timestamp - today_at('00:00') | as_timestamp) / 86400) | int %}
{{ iif(days > 0, 'Bins out in: ' ~ days ~ ' Days', 'This Sunday bin: RED
') }}
@slate mesa Does that value template work? I had to remove the quotes around the number to get it to work properly?
states are strings, so '0' makes sense there
I was thinking that too but in this case, it wouldn't work with '0',
@dark dirge That works 🙂 is there an option to do a hold_action that would allow me to edit the ISY Number? I have this set, but would rather just have a simple number input:
hold_action: action: more-info entity: number.timer_bedroom_tv_sleep_60
Figured it out. Was using a timer entity that appends a tenths decimal to the state even though its unit is in Minutes and the UI shows a whole number. I was able to parseInt the state and get it to work without the quotes or use '10.0' in my mockup.
Yes, it's a state variable from IoX if that helps
@slate mesa What kind of devices are you controlling with the ISY/IoX integration. I see that it can control Insteon and X10 devices which are super old; didn't even know they were still around. Although I did recently find an integration for UPB devices which were from the same era. (But ISY/IoX can do Z-Wave and Zigbee/Matter. Just never heard of it.)
I am in the process of migration from IoX to HA and I am using it to Control Insteon, Kasa, Z-wave, Thermostats, Tasmota, YoLink, iAqualink (jandy), Hue, Wirelesstag, Bond. The EISY/IoX PG3 Node Server adds some good options, but falls short compared to HA integrations and community support, hence my migration to HA.
I was just looking at the eisy | home controller. Looks like a pretty capable device but probably not going to play nice with HA even with the integration.
Integer and State Variables from the ISY are imported as number entities. You can choose which variables are enabled by default by setting the “Variable Sensor String” Config Option and using it as part of the variable name in the ISY Admin Console (e.g., HA. in options and HA.Variable Name on the ISY) or you can manually enable the entities you need from the ISY Variables device in Home Assistant.
I'm guessing you could probably do a call-service number.set to set the value in IoX. You would probably need an input_number helper entity to easily integrate it into the frontend along with some sort of automation or script to actually set the value when the helper's value changes.
Like this in the card:
hold_action: action: call-service service: number.set entity: number.timer_bedroom_tv_sleep_60
Can i do a input_boolean to and enitiy in a hold action?
something along those lines but you would need a data field to set the value. That value would have to be either hard-coded or templated to get a value from another entity such as an input_number.
I would try going to Developer Tools > Services and try doing a number.set call-service from there and see if it actually works first. (You can switch it to YAML mode and see the actually code that it is using if you want to incorporate it into your actions.)
hold_action:
action: call-service
service: number.set_value
target:
entity: number.timer_bedroom_tv_sleep_60
data:
value: "10"```
On a side note, HA has timer entities that can be used (once you started getting things migrated).
EDIT: Just realized this is actually input_number.automation_auto_hallway_lights_duration which is used in cnonjunction with the timer.automation_auto_hallway_lights.
So the ISY program that runs the sleep timer does some other things, like a macro when turned on and another set of actions when the timer is done or canceled
I have 60, 90, and 120 min times which all do the same thing but with a different time
@tribal galleon the number.set_value errors with Failed to call service number/set_value. must contain at least one of entity_id, device_id
Forgot it needs the entity_id as a target. Updated example above.
I would love to move the ISY timers to run their functions in HA, just trying to wrap my head around how I duplicate my ISY functionality to HA
It really depends on how you want to automate whatever it is and it sounds like they can do everything that ISY can do. I have most of my rooms with Auto Lights Off automations. They use a timer entity for the actual countdown. When light is turned on, timer starts. When timer has elapsed, automation turns off lights. (You can also set durations within the automation but I don't like that option because I can't interact/see it in the frontend.)
The automation also looks at an input_number entity which it uses to set the duration of the timer at the start. I can adjust the value of that entity within the frontend with sliders.
You have a couple of options if you like the 60, 90, 120 minute values. You could use an input_select (dropdown) and pick the value. You could make dedicated buttons to set the value. When making your automation, you could template the value based on time of day (or something) so during the day it could use 120 minutes but late at night might use the 60 minute value.
Today all of my timers for lights and what not are displayed on the Button or slider in the UD Mobile app, and the time for a specific light has a default value and can be edited in the UD Mobile app, I need to duplicate that function in HA.
Are you able to show a screenshot of what it currently looks like?
This is an auto-entities card that I have it showing entities that match input_number.automation*
This is a custom:button-card card that controls the automation on the left, has the slider to set the duration and a markdown card show the duration integrated into the card.
The configuration for my 'simple' timers are 4-5 programs each and a custom button/card in the UD Mobile app that calls the the toggle program and displays the timer variable status
Convoluted for sure but works really well, I assume HA opens a much more effecent way to accomplish the same
that's certainly my impression
anything that uses regular timers as a trigger should be re-thought
Why would they need to be re-thought? What would be the point of having timer entities if you don't use them as triggers? plus, like I mentioned, I also put them to use in the frontend. #1167984195545595934 message
I have practically no automations that just run at specific time intervals
Whats the code look like for that, I played with the mushroom one but the slider is wack because the entity (ISY variable) can go negative. I would basically want it to display 0-60 or up to 120 and replace all 3 sleep timers with 1
HA isn't cron, it's based on events
Most of mine in ISY are triggered by events for buttons in the mobile app UI. I do have some simple ones that trigger off the sun, but that is still an event.
Right. I don't have any time specific automations either. Timers turn off lights if they were left on or motion hasn't been detected. Besides, my cron-based events are in Node-RED. 0 */1 7-23 * * * and 0 */15 * * * *
I would have to DM it to you or post it on a code-share. It's about 40 lines long for one row. I haven't gotten around to templating it or incorporating variables to shorten the code.
Is there a way to have a selectable date at the top of a custom dashboard page, that limits the lovelace cards in dashboard page to that date, like the Energy dashboard page does?
For energy cards yes, for general other cards no.
I've sometimes thought it might be cool if you could tie a history graph start/end date to a pair of input_datetimes, though I'm not sure if that would be desired or not.
Thx, Always wonder if I am missing something and great to get input from others. Current use case is showing local weather station data for a specific date. I will look into your history graph suggestion.
Is it possible to change the entity icon automatically based on the entity status?
Hi guys, is there any buildin option to add switch confirmation popup?
Yes, it's called confirmation and you can adjust it via your tap action -> https://www.home-assistant.io/dashboards/actions/#confirmation
1 - platform: template
2 sensors:
3 buero_window_left:
4 value_template: >-
5 {{ state(binary_sensor.lumi_lumi_sensor_magnet_aq2_opening) }}
the idea is, to simply output the state of aq2_opening to buero_window_left
but it doesn't work...
is there a way to use confirmation for slider-button-cards too?
not for the slider itself
That only goes in configuration.yaml in the sensor section.
also, please take the time to learn how to format code
I've made a dashboard using UI-Lovelace-Minimalist which looks great on my phone, but I would like to make another for using on a tablet. Any idea how I make a second dashboard?
Adding it from the UI makes regular lovelace only
Then just edit the yaml as before?
Before you put your time into making a second dadhboard, have a look at Custom Layout Card and media queries to see if that would be an option for you. That way you only need one dashboard.
Any idea if that works when casting the dashboard? If so, thats super helpful thanks!
I would expect so,you just need to input the right conditions for your screen
Cool, I will look into that, thanks!
just tested on my Nest Hub and yes, it works 👍🏼
Cool! Thats exactly what I am trying to get to work. Still need to get the navigation to work correctly first (works on mobile and desktop, but not on the hub itself) Thanks for the help
ah okey, navigating the views worked for me (using buttons in the dashboard and not the standard app bar on top)
- type: 'custom:button-card'
template: chip_back
variables:
ulm_chip_back_path: home
I was using this. This path works perfectly on mobile / desktop, but when casting, only providing the full path worked. But then that didn't work so well on mobile. I think its a bug with some nest hubs, judging from a quick search
hmm okey. If you you don't get it working any other way, you can just delete that variable from the card and the chip_back template and add the navigation the normal way
tap_action:
action: navigate
navigation_path: /you-home-view
```
In a custom:button-card I want to define label in template state as a space or there but blank to keep my name an icon from jumping around when the state is changed. I tried label: ' ' and label " " and the space is ignored, using label: '.' works but is there a way to get it to honor the blank space?
what do you mean "Jumping around", can you post some examples?
label: ' ' produces this:
label: '.' produces this:
When the light is on it looks like this:
So without the label being there it the name and icon jump up
ideally I would like label: ' ' to be honored and put a space as a place holder for the label
I think you need to define the height of the label area for that to work as you want
@slate mesa I converted your message into a file since it's above 15 lines :+1:
Would the style function go in the parent or in the state?
it depends if you want different styles for each state or not. In my example I put it in the parent
I added this and it honors the blank space when off:
styles: grid: - grid-template-areas: '"i" "n" "1"' - grid-template-rows: 1fr min-content .3fr
But looks like this when on:
your grid template areas is i n 1 whne it should be i n l.
i.e not the number 1, the letter L but lowercase
I am working with fan scenes from the ISY and want the tap action to turn on the scene but only see an action of toggle, which requires me to press it twice to turn the scene on. Is there an action that will just send an on to the 'switch' regardless of state?
type: custom:button-card aspect_ratio: 1/1 tap_action: action: toggle entity: switch.bedroom_fan_off
you can use service calls in the tap_action
Thank you! Ended up with:
tap_action: action: call-service service: isy994.send_raw_node_command service_data: entity_id: switch.bedroom_fan_off command: DON
I have Bond fan device (fan.fan_family) which has direction (forward/reverse) is it possible to toggle direction using call-service fan.set_direction or in the custom:mushroom-fan-card. What are my options?
make a script that does the toggling. You need to be able to get the current direction for your device. So if your device doesn't support that, then you can't
This will display true/false for the direction:
{{ is_state_attr('fan.fan_family', 'direction', 'forward') }}
ok, and what services are you using?
IDK maybe:
service: fan.set_direction data: direction: reverse target: entity_id: fan.family_fan
well, figure out what the 2 services are and then post them here and I'll help you write the toggle script
tap_action: action: call-service service: fan.set_direction data: direction: forward target: entity_id: fan.fan_family
that sets forward and swap forward for reverse and that does reverse
I tried making a feature request on the github site a month ago and i'm not sure anybody looks at the requests, there is no action or response on it. Maybe some of the dev team monitors this channel, so i'll try making the request here. I'd like a simple icon change in the to-do lists. Items on a to-do list that are checked off are moved to a list at the bottom and there is an icon at the top of that list that looks like it's indicating heirarchy of a list or possibly sorting of a list. My family keeps tapping that icon thinking that it will sort the list, but instead it purges the list and we have to start building our list all over again from screenshots. In the past i had a script that saved the .json file of the shopping list, but since November the to-do lists don't reside in that .json file, so screen shots it must be. If that icon could be changed to the standard trashcan icon instead i think it would save us a bunch of time.
Ok, make a script and use this as the template for direction:
direction: >
{{ 'forward' if is_state_attr('fan.fan_family', 'direction', 'reverse') else 'forward' }}
then just call that script and it should always toggle the fan
so name the script toggle family fan or something
Then use the script as your tap action
feature requests are not guaranteed. This is open source software, your best bet to get your feature into HA is to do the work yourself. There are 7 or 8 year old feature requests that still haven't been implemented.
As for your issue at hand, next release is adding the ability to get listed todo items, you may be able to build something that adds them back if they are accidentally deleted.
{{ 'forward' if is_state_attr('fan.fan_family', 'direction', 'reverse') else 'forward' }} <- one of those needs to be 'reverse'
what type of Sequence would direction: be in the script?
I haev no idea what you're asking
this is what your script would look like
some_script:
sequence:
- service: fan.set_direction
data:
direction: >
{{ 'forward' if is_state_attr('fan.fan_family', 'direction', 'reverse') else 'reverse' }}
target:
entity_id: fan.fan_family
rob, you're gonna get a poop emoji even if you delete your comments
as it should be
That would be great... Hopefully there will also eventually be a todo.sort call coming. The purge/delete icon issue is still troublesome though, it's very hard to teach an 80-year-old that the icon that looks like heirarchy or sort actually carries out the function of what would otherwise look like a trashcan icon. There is overwhelming historical pressure to expect a delete/purge function to look like a trashcan icon. I don't know of any way to change that icon in yaml either, i've looked all over the files that are available for edit on the hass shared folders and found nothing that would let me change it.
right, but that means you have to wait for the feature to be implemented. Discord is not for feature requests, where you posted the feature request is where you make feature requests
I understand your frustrations with the icon, but the point is: if you can't do the work yourself, you have to stick to the feature requests paths that HA offers
You're referring to the github feature request? It is already there, although i wasn't really sure where to post it since it's not really a programming request, . I've been watching that blog for a month, not expecting action, just more expecting some kind of reply or acknowledgement that it'd been seen and that i didn't post it blindly in the wrong forest. I didn't think to look for responses to other requests to see if any had been eventually implemented without there ever being any response to the requests. I shall drop it then.
Using the Android TV remote integration, how would I get the app name to appear as an secondary state on the media player card? ex: ' com.google.android.youtube.tv' as YouTube
I don't know if you can, directly from the integration. The ADB integration supports a mapping
you could do it yourself in a template, of course
I see you're using Sheild as well, are you using app friendly names?
So, Android Debug bridge supports this?
it provides the entity above
I do things like this, so yes: until: "{{ is_state(entity_id, 'playing') and is_state_attr(entity_id, 'source', 'YouTube TV') }}"
Can the state attribute value:
{{ state_attr('fan.fan_family','direction') }}
be used in the in states to display the as the name: or label:
in what card?
Okay thanks, but how would I go abouts implementing this? I'm not good with templating
custom:button-card
This sounds like you're just trying to make a switch out of the fan direction
which would be a template switch
I have the button calling the script that toggles the fan direction and wanted to disaply the direction on the button
yes, I have a /homeassistant/switch.yaml which has some - platform: template items I created
ok, add a template switch for that then
your template will simply be value_template: "{{ is_state_attr('fan.fan_family','direction','forward') }}"
then you can add an icon template, your turn_on and turn_off will just be a service call for each direction
I don't understand why Android Remote is half baked, if ADB integration is being phased out
I've seen no indication that the ADB integration is being phased out
I can't remember where, but I read it was been removed with the introduction of the Remote integration. I guess I maybe mistaken, if that's the case then I'll just switch over to the ADB integration for the Shield TV, since it supports more functions
Will the on/off be the script we created?
Hi.
I have a wierd quetion...
Im using this code:
[[[
var weather = states['weather.forecast_home'].state;
return '<img src = "/local/images/' + weather + '.svg" width="140" height="140" />'
]]]
Yesterday it worked.. but today it does not.
I have now checked the image link, and it returns something completely different.
local/ic/weather_icons/animated3/clear-night_night.svg
Any idea what this could be?
You probably need backticks and not single quotes around that
hm i could try, but i dont understand why it works one day, then does not work the other day
backticks and properly formatted string replacements
ok i will try ty
for turn_on: is it service: fan.set_direction.forward ?
if that's what you want it to do when you turn the switch on
I want it to toggle like the script did
have turn on do whatever your value_template is looking for
So if the value templte is "{{ is_state_attr('fan.fan_family','direction','forward') }}", then I would just do direction: forward in on and off?
yes for turn_on, turn off would be reverse
it's toggling the direction between the 2
I feel like you're not thinking about what the outcome is
it's a switch, where on represents whatever mode you want and off represents the opposite mode
so if the outcome is forward, it would run the off, which should be reverse?
If you just want to toggle, you can also use a template button
he wants the label to update and icon
I want a toggle and to be able to display the status in the button
so I have the switch working with a status of 'on' for forward, do I build out the status template in the switch template or in the button?
You'd make an icon template on your template switch
and if you want words, you can make a friendly_name template
Did not work, or i did it wrong... but i don't understand why it worked for a week, but today it does not.
Ok I feel like I should know this but it's driving me nuts. Where do I put button card templates?
The documentation for the project I'm implementing says to put it in "main lovelace configuration" -- does it mean config.yaml?
it depends, if you are doing your dashboard in yaml or in the GUI?
Is that riendly_name_template: on the the template switch? I don't see how that is done
I usually use the GUI then edit/tweak as needed in yaml
in that case you add the templates at the very end of the Raw configuration editor
Thank you
line 111 is the first button card template in my screenshot
then just add the rest below
the stuff above line 110 is the content in the dashboard
When I create a dashboard using Mushroom cards, where is the yaml that it generates stored? When building the dashboard, there is the option for the visual editor or edit the yaml code. It's the location for that yaml code I'm interested in.
Running a vertical-stack with 2 horizontal-stacks for 4 buttons, 3 are mushroom-light-cards and 1 is custom:button-card. I played with the custom:button-card aspect_ratio: 2/1.03 to look good in the Web UI, but on my HA app on my phone it isn't the same size as the others. Is there a way to set the aspect ratio so they all play nice together?
In the raw-editor #frontend-archived message
Thanks! But do you know where in the HAOS file system it is stored?
It is stored as JSON in .storage
I just started using this lovelace card that is kind of like vertical-stack except that it can expand and collapse it's child cards. I love it for grouping things like lights by room. It has one almost dealbreaking bug where if you define a "title card" to be used as the expand / collapse button instead of just using the default text label, the screen refreshes every 10-15 seconds, wiping out what you just did. The original author does not seem to be around anymore. There is a fork but is has the same issue. There is a workaround where if you work directly in the yaml, the refresh happens only once then stops.
The expander card is written in svelte. Is there anyone here that is skilled in svelte that has any interest in trying to fix this refresh bug? Does anyone know of any other lovelace card that supports expand / collapse of child cards. This is the only one that I could find.
https://github.com/Alia5/lovelace-expander-card
I’m can’t seem to figure out how to add a filter or only show the lights that are on. I’m using a custom stack in card, a swipe card, and a mushroom entity card. Currently, it just shows a list of all of my lights (group.lights) that are on AND off.
I am able to create a working chips card and an entity filter card, but for the life of me I cannot figure out how to get either to nest within the custom stack-in and swipe layout. I tried to create an auto-entities card as well, but that also brought in my camera’s infared lights that are always on. I also tried to add filter options but that didn’t seem to work either. Any help would be much appreciated.
When I am using a mushroom light card, I can specify an icon color the the icon will be when the light is on. If I am using a mushroom entity card to run a script or activate a scene, it also has the option for an icon color. What controls when the icon goes to the specified color when running a script or activate a scene? What I am after here is to know which of the scenes or scripts are currently active. If I have a HIgh, Medium and Low lighting scene, I would like to know if any of the scenes currently match the lighting state (brightness, color, etc).
EDIT: I just read in the docs that scenes are stateless. I am fairly new to home assistant but have been doing lighting control for more than 20 years in at least five different lighting control systems. If I have scene one with three lights and I set those three lights to 50%, the feedback state of that scene is now true. If I run scene two with those same three lights that sets all three lights to 25%, scene two is now true and scene one is now false. That way you know which scene is active. How is this done in Home Assistant?
I'll see if I can get that working. Thanks
Xuống đi e
my dashboard's login screen suddenly only shows 1 (disabled) input field, and no buttons... already tried another browser, cleared browser cache, even did a fresh install but the issue was back when the restore was completed. anyone any ideas ?
Are you by any chance running the beta?
hm could be. not 100% sure to be honest. but after a fresh install i would expect the latest stable to be there, and im 100% sure i dont have auto-update enabled (i like to see the updates and read the changelog to keep an eye on progress thats made), so a beta should not be auto installed
i am currently trying another fresh install and restore. its a Yellow, and i have the USB-C serial connected now, to see if anything usefull shows up there
The restore progress screen didnt change, but in another tab when i reloaded site i got the same broken login screen again 😦 i think last time i rebooted right away, but may be the restore isnt finished yet. it warns it might take 45 minutes, and it has been less then that. the backup file is a bit over 1 gb, but its running on nvme...
That login screen is only introduced in the new beta. So if you are able to update the system to 2023.12.0b1 or 2023.12.0b2 a patch is loaded
Thanks! a ha core update via the USB-C CLI did the trick
But its not running a beta, its now running 2023.11.3
Hi, I have odd behavior for auto-entities, any idea what this could be? The ones missing from the states are 'old' entities, which were there 30mins ago
Howcome auto-entities is still showing these 'old' ones? I can filter the out via last_change ...but...odd
So some exist in 'entities'....but are unavailable, others are not found *B(0)17"...really weird
@pseudo berry Does this work?
color: |
[[[
if (states['switch.shelly_eingangsbereich_aussen_aussensteckdose'].state == "on"){return "red";}
return "lightGrey";
]]]
No sadly not
What is the rest of the YAML related to the icon or styles part?
post your entire configuration for the custom button card
@pseudo berry I converted your message into a file since it's above 15 lines :+1:
@pseudo berry are you sure your sensor doesn't have a typo in the name
all your other entities object_id's start with shelly1pm, where your switch just starts w/ shelly
i.e. make sure your switch has the correct entity_id
Another thing that helps is to add a triggers_update key with the entities used in the templates. Otherwise the card only updates when the main entity does.
type: custom:button-card
entity: input_button.helper_staus_wechseln_aussensteckdose
triggers_update:
- input_select.shelly1pm_eingangsbereich_aussen_aussensteckdose
- switch.shelly_eingangsbereich_aussen_aussensteckdose
I have a mini-graph-card with 48 entities, 1 bar for each hour electricity price today and tomorrow.
Is there any option to add an indicator for where in the graph the current hour is?
Similar to apexcharts "now: show: true"?
Inserted this but the color won't change anyway
@lyric prairie with the triggers_update, I never considered adding that into my cards considering a bunch are using templates relying on other entities.
Does that IF statement need an ELSE? isn't it only going to return lightgray?
Also just noticed that lightGrey will not work but lightgrey should according: https://developer.mozilla.org/en-US/docs/Web/CSS/named-color
Also happen to notice by diving a bit deeper in the documentation that the global color key does not supports templates @pseudo berry
So to use a template you will need to work within the styles part
I think this is what it needs. (Spacing might be off; currently mobile.)```yaml
styles:
icon:
- color: |
[[[
if (states['switch.shelly_eingangsbereich_aussen_aussensteckdose'].state == "on") return "red";
else return "lightgrey";
]]]
Thats it! Thank you
Not sure if this is the right channel or not, but I'm looking for a way to limit the dashboards that can be seen by a certain user. I created a non-admin user for my parents to be able to control some lights and stuff when they're babysitting, but that user is able to see stuff like the Energy, Shopping List, Logbook, etc. dashboards. I know that I can hide them in the user's settings, but surely there's a way to just remove that user's visibility to individual dashboards, right?
no there isn't
I won't repost it here to avoid giving it more visibility, but there's a tinfoil-hat thread on the forum about the "desperate" need for role-based access control
I know 
hi. i have a weird issue where my dashboard does not allow me to add a tab called bedroom. i had one before, deleted it, but now i may not create it because its already taken or something(already using same URL error) how do i solve that?
I would open up Raw Configuration editor from edit mode and make double sure no other view is using that URL.
Is it possible to create an adjustable timer like this without that i need to write my own custom component (not looking at the colors)
Hello, im quite new to home assistant and i was wondering if it would be possible to rebuild the dashboard with custom html, so i can include library's like Three.js ?
I'm struggling to figure out how to use any picture element card to access local media folder that I have configured. What I've done so far:
- followed https://www.home-assistant.io/integrations/media_source/ to set up my media_dirs, one of which I'm calling myimages
- verified that directory and files are visible in the media-browser (the left-nav-panel "Media" tab) under My Media > myimages
- reviewed https://www.home-assistant.io/dashboards/picture-elements/ which says local media will follow the guidelines at https://www.home-assistant.io/integrations/http#hosting-files . however, nothing on that last page mades refernence to the media_source and really is just talking about files you would serve out of www with no authentication. I'm using a picture card on a dashboard so the user will already be authenticated, and while it's possible to access these myimages files from a URL that includes the authentication credentials (such as https://myserver:8443/media/myimages/somefilename.jpg?authSig=reallyLongAuthSignatureValue) that auth signature should not need to be provided to a picture card.
I'm certain that there must be a way to use dashboard cards to access local media that is configured per the media source guidelines but I can't figure it out. Anyone know what I'm missing?
Yes, but you have to write the code yourself. Use the developer documents to learn how to make custom cards.
The media players themselves have the image when playing. Use that url.
Hi!
I'm using expander-card (https://github.com/Alia5/lovelace-expander-card), but when placing the expand-button on top of slider-button-card, its a little bit wider than the other cards that are not using the expander-card.
I've tried a multitude of things using style, but nothing seems to do the trick. Anyone have any ideas?
hmm I dont get that behavior, it's just as wide as the rest. Can you share your yaml?
Also, if you don't get it to work you can try Collpabsible Card instead. That has worked well for me before
hmm I dont get that behavior, it's just
I just found "max-width: 472px;", which solves my problem
So it'll proably look correct now, at least it does for me
Hm, still looks wrong on my phone. Guess that wasn't the solution after all
I've tried Collpabsible Cards before, but I went with Expandable cards, for reasons I cant remeber anymore. Might be worth revisiting to see if that works better
is there a card which show list of entities under entity (entity-sub entities)?
For example:
Old breaker box - 50W;
Device 1 - 20W, Device 2 - 20W, Device 3 - 10W
How to remove the part around the Icon in the mushroom card?
Thanks
I have the URL from viewing in Media player but it requires an auth token even in the picture card. I didn't see where the auth token was being generated to know how safe it was to keep using for something that has a long life like a picture card, or if there's a security risk in doing so. Really it feels like anything local to HA should be accessible within HA without using full URLs like that.
Not sure how it requires an auth token to use the url
just use a template
it should just show you that image immediately w/o any extra steps
the format that it requires is https://myserver:8443/media/myimages/somefilename.jpg?authSig=reallyLongAuthSignatureValue including the authSig. If I exclude the authSig param it throws a 401.
what do you mean about using a template though? maybe i'm doing something wrong.
I'm not playing music, just trying to display images, in case that matters.
I'm just trying to display images using any picture card pulling from the files I've put into my myfiles folder
Ok, well then that's different
but you can still do what you want if you have the auth sig
you can use a template to generate the url and add the auth sig to it
Yeah, I was concerned that throwing this authSig into a bunch of cards ws not a great security idea, both from maintenance (does that authSig last forever?) and from secuirty. But I can give it a try.
It just isn't making sense to me why a logged-in user needs to also have an auth token provided to access on-HA resources.
how do I access the Attributes in an entity in javascript code in custom button card? for example my entity fan.living_fan has state on/off and attributes direction, percentage. How do I access the particular attribute percentage?
exposing any media to the internet typically requries you to place files into the /www folder
anything outside that and you need extra hoops
Right, that's sorta my point - I don't want the files to be accessible by just anyone, but the fact that the user is already authenticated should be enough to grant them permissions to any of the local media, which should then be accessible by some URI scheme that doesn't rely on URLs that contain their own authSig to grant that access.
But I can see that that's not how HA works today so I can move ahead w/ this alternative approach for now. I appreciate your help in trying to sort it out.
uh, that token is still present if you know how to find it
just browse your media files and hit F12 on the image
token for who'ever is logged in to see
so I'm not really sure why it worries you
is it guaranteed to never change?
No idea, never bothered looking at it
well, that would be one reason it bothers me.
why don't ya just try it 😉
if i'm going to create dashboards that are meant to present images from a folder, all i want to do is tell it what folder i'm pulling those files from. i don't want to have to worry about whether an arbitrary authSig is going to change in the future and break the dashboard. you know?
yes i plan to try it. but i started here becuase i wanted to be sure i wasnt just missing something about the correct way to do this since this isn't making sense that it's the only supported method to access media files outside of the wide-open www. but yeah i'll give it a shot.
There's a 1000 different ways to do everything, the easiest way by far is to use the local folder
I will prob start w/ using that for this experiment b/c I'm planning to share this solution with others and giving guidance to everyone about how to find and update this authSig thing is not super practical. Hmm. It's just bizarre that it's wide open in that situation. oh well
You'll need to use card-mod to remove the color from around the icon. yaml card_mod: style: | mushroom-shape-icon { --shape-color: none !important; --shape-color-disabled: none !important; }
assuming it's sthe same tokens, just make a long live access token and use that
If the entity you're trying to get the attributes from is the defined entity for the card, you can use something like this:yaml name: '[[[ return entity.attributes.brightness]]]'For a different entity, the syntax would be:yaml name: '[[[ return states["sensor.outside_temperature"].attributes.unit_of_measurement ]]]'
Thank you!
@fading musk I converted your message into a file since it's above 15 lines :+1:
Im trying to do a custom fields button that will show the fan on the top right. but it doesn't show up. What am I doing wrong?
I have some examples that will help you. I'll be home in about an hour and will be able to easily share them with you.
Ok sure! look forward to your examples!
you missed underscore in custom_fields
Hello, is it possible to use inside a picture elemts card which is used for a floorplan, also use inside this another picture elements card which should be positioned in the top right corner of the floorplan?
you could edit the background image to contain the other image in the first place and put all your elements in one picture elements card
can i send you a pm?
@fallow flare I converted your message into a file since it's above 15 lines :+1:
Apparently I asked in the wrong place, Trying to figure out hwo to use templating (if statements) with mod_card. The idea being that if the entity is +100 or greater, it should flash/blink red. .. I've some up with this so far but it doesnt seem to do much at all...
@next rivet I converted your message into a file since it's above 15 lines :+1:
Im trying to do a custom fields button
Howdy Home Assistant. Happy humpday! I've been looking at the new tile card and I'm excited about the potential it has!
I've set one up for my thermostat and I've set the preset modes to "icons", but no icons are showing up! Just dots. (Pictured)
I'm wondering if there's something I can add to the code editor to select a custom icon for each preset.
Thanks for any help offered in advance.
many thank
In general I like the new thermostat card. However, the actual temp is FAR FAR too small, and it's at the bottom. Target info needs to be MUCH smaller, then put actual temp up at the top.
Has anyone had isssues with card-mod displaying properly in the official android app? Trying to use custom:mini-media-player inside of custom:mod-card, but getting conflicting results. On PC browser (Firefox 120.01), fine, works as intended.
On the HA Android app, it throws up the error Cannot add property style, object is not extensible.
I have tried just using card-mod values instead of putting it inside custom:mod-card, but it doesn't seem to do anything, so I assume custom:mini-media-player doesn't have the requisite ha-card element?
:: Update ::
I assume my indentation was off somewhere; I've tweaked some things, but now instead of not extensible, I'm getting straight up custom element doesn't exist errors instead on Android - and still works perfectly in Firefox.
**:: Further update :: **
...and app reinstall fixed it. Goddamn.
state_display: '[[[ return states["fan.master_fan"].attributes.percentage ]]]'
How do I display a mix of values and text? I want to put a % after the 42
Thank you!
Anybody know why my tile cards tap action isn't working after updating to 2023.12? The icon tap action still works, but not the main card.
anyone using the compass card for wind ? , i entered the wind direciton entity and its just stuck on showing north as direction
Example...
After update I missing night temperature in thermostat. I use MQTT Climate Entity. It was there before update, what I need to change to bring it back?
Thank you 🙏
Guys, is it possible to use the same color template in more than one card but without c/p it to ecery other card. What I'm thinking about is to source the code in a .yaml file out and insert only the "hyperlink" in the actual card.
Usecase: I have for every room one card and on every card a thermo sensor / humidity.... I want to colorize the icon according to the sensor value. The template will be the same for every e.g. thermosensor. Is this possible and if so, how?
That's what the theme is for 🙂
You can create your own and add all you colors there
But I want it only on specific cards, than it won't work that way will it?
How did you get that modification of thermostat??
Could you send it?
Many thanks.
There's nothing special I've done! It's literally just the built-in thermostat card in home assistant.
Really??
yeah, literally just "thermostat" card, with the new features enabled
update your home assistant :)
the update that was released yesterday enhances the thermostat card
Wow okayy
as well as hot water and other hvac cards
Nice. Thanks @gleaming oriole
You're very welcome!!
Going further into this, it looks like icons are missing because there are none -- I read in a git issue that they're trying to look into ways to add them. So for now, it is icon-less icons!
Anybody know why my tile cards tap action isn't working after updating to 2023.12? The icon tap action still works, but not the main card.
There's already been an issue filed and it looks like a PR for a fix is in progress. Well it looks like the fix is related to custom themes and custom border-width, I'm not sure if that applies to you. Check the frontend github for issue tracking.
Yup, I saw that this morning after reposting. Thank you for the heads up!
Hi,
With the new thermostat card when I press the mode buttons it jumps all over the place. Is anyone else getting this or know a solution?
Thanks
Hello guys, I'm having this issue since I started to use themes (no matter where firefox, safari, chrome and even on the HA mobile app for iOS) on all my devices at home
Sometimes the dashboard doesn't load, I have to refresh it several times until it works
This problem doesn't occur while using the default HA theme (tried many others)
Link to the video: https://gemoo.com/tools/upload-video/share/591393809308352512?codeId=vz8rWVQJYw8La&card=591393805063716864
I see references that !include can be used on the dashboard but I'm not sure how?
It can only be used if you have the dashboard set up in yaml with a code-editor
Oh ok so you can't do this in the frontend with the UI editor
Not with GUI
Sounds good
nvm i just was working in an old tab and hadnt reloaded
@gleaming oriole one question, do you know how to change the order of the heat and off mode?
Thanks!
I didnt do anything 🤣
Only updated. Maybe try to restart again? Or try to restore a backup and update again
It depends on feature. You can choose which mide you want and it is shiwn in order you activate them in card configuration.
Not for me... I try that before and didnt work
Then maybe try change hvc_modes order:
I think it has something to do with horizontal-stack or area views
I feel like an idiot asking this. I have 3 zones for heating. We do not have AC.
I cannot figure out how to get it show only the heating slider.
My feeling is I need to some how get right of cooling here?
Is it possible to also get a fan speed control on the card?
I'm not sure but mine has an attribute for it, but every model is diferent
You can use the developer tools to check if yours supports it
This helped me, but I'm still unable to get rid of the cooling slider or temperature.
hello all, is there any way how i could enter primary and accent colors in the mobile app by numbers?
Is it possible to use Browser Mod or something similar on a dashboard that's being cast to a device via Google Cast? For instance, I'd like the dashboard to navigate to the Media view when I start playing music, or to show my front door camera when someone rings the bell without having to tap anything to initiate.
Hello, what add-on do you recommend that will allow me to hide the sidebar and toolbar in the dashboard?
I have already tested an add-on in hacs called WallPanel, unfortunately it does not suit me because it has a white line on the left side which is very visible and after a while a different dashboard is shown.
Kiosk Mode in HACS.
Okay i try. Thanks
I went to the beginning of the rabit hole and turned back.
good evening, how do i style an entity: sensor.time within a picture-elements card that it resizes on different sizes of displays. For example Screen with full hd and on the phone? I tried different things but for state-label nothing is working...
Hi
How to change color of fan mushroom to white.?
Thanks!
Did you use the card_mod that I showed you the other day for the icon shape? If so, you can add to that for the icon color. yaml card_mod: style: | ha-state-icon { color: black; } mushroom-shape-icon { --shape-color: red !important; --shape-color-disabled: none !important;} }Or, you should just be able to use icon_color: white in the card's yaml. But you won't get on/off colors. For that, you would need to use card_mod or switch to a mushroom-template-card but then you have to define everything for the card.
Also, I realized I should have clarified the difference between shape-color and shape-color-disabled. Basically, on and off colors.
Thanks.
But it is alway White when state to On
I use MQTT Climate so in my case I define modes in these order.
Hi.
is there a way to calculate the average of 4 temperature sensors in one room, and output the average between them?
If you're using one of the stock cards (other than Markdown), the answer is no. Using a custom card, you might be able to apply a template with Jinja or Python.
Back to the stock card, you can make a sensor entity to do that. #templates-archived can help with that.
For anything calling for an icon, is there a way I can use my own png or svg instead?
preferably png because they don't have to be big and I'm really bad with inkscape
turns out you can just use type: image instead of type: icon, ez
Yes, use the font awesome custom integration
it only allows svgs though
pngs also look terrible if you don't make them correctly
as for pngs, you can simply use the picture_entity attribute
or type image like you did
yeah lol ez
now I'm trying to figure out how to navigate the new hacs update
it's very clunky
How can I show the history of two entities in the same graph?
Currently this is what it looks like, but want both lines to be in same graph (different colors would be ideal)
You can't do that with native graphs, you'd have to use something custom, like apex charts, mini graph, or history explorer
thanks, is one recommended over another or should I just explore all of them
I'd just explore them all, apex has the most customizeability
Hey all. Made a custom button card to call a service to restart HA for the wife and kids. Getting the failed to call tho with unauthorized. Any workarounds for this?
can you post your yaml?
sure
