#frontend-archived
1 messages · Page 32 of 1
is it possible to display temp sensors in both C and F in the dashboard? currently, all my temp sensors display in F, so I tried testing the unit_of_measurement config to just show in C, that failed.
- entity: sensor.switchbot_outdoor_meter_temp
unit_of_measurement: C
Still showed in F. Any ideas?
If your default unit is F, you'll need to make a template sensor in configuration.yaml to convert the value to C or use a card that can have a template applied to the entity. This is what I use to create an entity in C. ```yaml
sensor:
- platform: template
sensors:
sensor_f2c:
friendly_name: "F to C"
unit_of_measurement: "°C"
value_template: "{{ (((states('sensor.bathroom_door_temperature') | float) - 32) * 5.0/9.0) | round(1)}}"```
If you use the custom:button-card, you can use ```yaml
type: custom:button-card
entity: sensor.bathroom_door_temperature
state_display: '[[[ return ((entity.state - 32) * 5 / 9).toFixed(1) + " °C" ]]]'
show_state: true
show_icon: false
hmm, the I don't understand the purpose of unit_of_measurement if I have to do my own conversion. Is it just used to show the F/C strings?
I think it depends on the capabilities of the card. There might be some that can handle conversions, but generally, the unit_of_measurement attribute is just used to show the F/C string, like you said. But it is useful for something like this where the unit is not hard-coded: yaml secondary: ' {{ states(entity) }} {{state_attr(entity, "unit_of_measurement") }} '
Can i have multiple Camera entity cards on top of each other.. and then just swipe to the side to scroll through them?
You could try the swipe-card. Just be aware that it has not been updated in a while and is kind of buggy. A couple of forks available have some updates applied but this would be a good place to start.
sweet thanks
so i gone thru those examples but idk why im still lost i think my card mod is broken im going to try to reinstall it
I was thinking about that earlier and meant to ask if you had any working examples using card_mod or if this was your first attempt. Reinstalling, perhaps rebooting, should fix the issue.
no i installed card mod on the first day of installing ha when i was completely clueless so i dont have any working now im about only 80% lost still
Did you install using HACS or try the manual method? I recommend always using the HACS method whenever possible.
i did hacs method but im going to try to uninstall it and try again
There should be a Redownload option that you can try.
is that the same thing?
Probably just a more automated process.
oh oke thanks
is there an easy way to check if it worked?
Try adding one of the more simple examples to a card. yaml card_mod: style: | ha-card { color: red; }
any card?
i mean yesterday i added segments colors to a gauge that works
Click the Show Code Editor in the bottom left. That's where you add code.
so far that worked... my need for it was simple
4 cameras... dots on the bottom
Maybe I should ask this question in the frontend area: Is this the right place to ask about Scenes? I’m having an issue where my scenes that I’ve previously set up are now showing as empty in the Settings UI. They are still defined in scenes.yaml, but none of the configured entities show up in the UI when I choose to edit a scene.
hmm ive installed Custom text-divider-card, but when i try to use it i get the error: Custom element doesn't exist: text-divider-card.
- type: custom:minigraph-card
entities:
- sensor.fast_com_download
name: Fast.com Download
line_color: "#FF5252"
line_width: 3
font_size: 12
background: "#121212" # Dark background color
theme: dark-mode-theme
how come the theme and the background thingy dont work or how do i do that?
i messed up need help
@silent wind I converted your message into a file since it's above 15 lines :+1:
that was the working code that worked for showing the ping graph
now i tried the same below
@silent wind I converted your message into a file since it's above 15 lines :+1:
it just shows nan
what am i doing wrong?
see the left one is the yellow one is the original ping code
so after messing around the speedtest graph is colorful i thought i should do the same with the ping graph
so its just showing nan on the right
idek what i did wrong but i guess imma just edit the original yellow ping graph rather then tryna make a new one
there has to be a better way to show this nicely
idk why speedtest is showing wrong results
that does look good but i want it to be dark mode or black
apexchart you can edit as much as you want 🙂
really?
is there anything else u suggest i'm pretty new to ha so anything else u suggest ? looks good im installing the apex already
the first link is the card it self, the other link is the communty forum where allot of info is visible and usefull
ooo got it thank you
u got anything for buttons specifically for wake on lan devices or any design ideas mine looks dull and yellow now lol
well.. it depends a bit.. i usually use the custom:button-card for most stuff
welp mine looks like this now idk how do make it pretty or anything
its oddly long
lol
i have 33 devices or something configured for wake on lan
group by room? all are in the same place lol
i mean
if i do group by room how is it?
its basically an office
basement 11 pc
ground floor 17 pc
7th floor 1 pc
6th floor 2 pc
something like that
you make a dashboard for each floor as an example, and on the dashboard you create a button for all the floors with f.eks "10/23 online devices
Hi guys I have a strange issue regarding the Mushroom Chips, Conditional chip. Despite the condition being false, the chip always is displayed. No matter what chip or condition I choose.
so like a tab? the thing that goes across?
or like lobby,basement
so this is my dashboard.. its nin norwegian (Sorry).. but there you have a "stue" whitch you could change to "basement" and the "on" statement could say:
20pcs online as an example
this dash is ony for stating light though, but the cards are customizable and could be used as a card to navigate into your rooms / floors to show the data for only that floor or room
depending on what you really want.
Me personally like clean stuff, so messy dashboards and loads of info is not my thing hehe
ahhh u got a big brain my friend i see ur point that is smart and is it possible to just turn on 1 individual pc in this kinda setup
i understand that idk what i'm doing on colors or designing im bad at it so right now just copy pasting others design
dont worry about the design yet.. start with simply sorting out.. make one tab for each floor, and then we create the buttons 🙂
IF you are interested in that thing. We can help you with the design part later 🙂
can you point me where or how do i make the 1 tap thingy?
i ment tab, my dyslectic brain mixes letters some times
so i keep the wake on lan tab
in it i make 1 button that does it for those areas?
or separate tabs for separate areas?
my home assistant shows a black screen in google chrome. Anyone having this issue?\
I had the same issue, i re-installed chrome and it worked.
But you could try to clear the browser first.
I reinstalled and its still the same. then I deleted the "dark reader" extension and that worked
you could try to set a rule in the dark reader, to not do anyting to the url of your ha dashboard
Does anyone know if there is some special thing i need to do, to make kiosk mode work with a clean yaml dashboard (based on ui-minihass)
In edit mode it will always be shown
@wicked drum I converted your message into a file since it's above 15 lines :+1:
True, though it stays visible when I save card. Example:
type: custom:mushroom-chips-card
chips:
- type: conditional
conditions:
- condition: state
entity: weather.openweathermap
state_not: sunny
chip:
type: weather
entity: weather.openweathermap
The current weather status is Sunny and the chip is visible. Which shouldn't be right.
Mushroom: 3.2.3
Core: 2024.1.2
Supervisor: 2023.12.0
Operating System: 11.4
Frontend: 20240104.0
I'm trying to control my smart TV from HA. I've made a button which should turn it on and off. But once I press it for on it goes to "Welcome to home assitant" and upon pressing the on/off again it shows the normal tv button and doesn't turn off the tv. Is it something wrong with the device?
Did you use android tv or chromecast as a device? so it tries to stream a dashboard onto your tv instead of turning it on
I've done it via the chromecast this time, I think I connected the android tv as well which doesn't work
With the chromecast it turned on but into that dashboard streaming. And with the android tv it says the following: Failed to call service media_player/toggle. Entity media_player.43pus8118_12_192_168_1_165 does not support this service.
Playing a radiowebstream (p.e. http://icecast.omroep.nl/radio2-bb-mp3 ) through a KODI instance doesnt update the dashboard card everytime the song changes on the radio (Kodi instance self does show the correct information) any ideas how to get that data displayed? (OpenHAB did show that information so i doubt that its a KODI issue)
Only the song played when the stream started gets displayed but next songs in that stream do not get updated. Multiple mediacards have that issue (Mushroom/Mini) so i guess its a integration issue. but because it shows on the frontend, first a question inhere.
trying to set a dynamic (weather camera) background to a subview. Hovere, the mod I use for my regular views doesnt work, as it uses ```
card-mod-view: |
horizontal-layout {
{% if is_state('input_boolean.weer_view_background','on') %}
background: repeat url({{state_attr('camera.buienradar','entity_picture')}});
{% endif %}
}
anyone here with a suggestion to try? (btw, reason I need card_mod and themes, is because of the template to the attribute)
aarghh: card-mod-subview helps...... was a wild guess (havent seen it documented or in inspector yet)..
❓ Need som help with some CSS animations. I have these spinning animations triggered by :hover
But they only play 100% if I keep hovering for the duration of the animation. Is there a way to play the whole animation even if a move the mouse away from the card?
Some days ago, I opened the HA App on my Phone and saw all the Dials in a Square Grid, which I liked a lot, it try to illustrate it in the picture.
Now everything is back to normal, rectangular boxes.
Was this just a glitch or can I have square grid permanently?
You can use the grid card
Type: grid
Columns: 2
- type: grid
square: false/true
columns: 2
cards:
-type: ## Your card ##
I'll try! Thanks! 😀
How can I create such widgets? The largest one will be used by Picture Elements. How can I stretch them like this
\
layout-card would probably help 🙂
Hi. I finally got kiosk mode working, but I do wonder if it's possible to change the color of the bottom ?
I thought you meant that you have to click 'Save' for the it to work. I didn't know I had to exit edit mode. It works now, thank you sir!
Hi, I want to ask some help, don't what am i doing wrong
I want the graph to change based on the date I choose. Now I use config-template-card to do this but it doesn't work
I think this will take care of the bottom too. At least I don't see a different color there. Put it in your theme
app-header-background-color: var(--background)
This is exactly what I did, but that only removed the top. But I am using a google pixel 8 phone.. it might actually be the phone that's the issue.
It got solved by using minimalist mobile theme. I might need to look there and compare it to your theme
Thanks @zenith stag for quick reply! Where is that buy me a coffee button? 🤭
at your service
Does some1 know fancy closing curtains icons, and then those that go from left to right and left and right inwards
not this
like this
but then multiple stages
anyone been able to get conditions working on standard climate control card - i want to hide modes if the action is set to auto?
@blissful tiger I converted your message into a file since it's above 15 lines :+1:
it's not "fancy" since it's red, but you can always put a black and white filter on every picture
https://github.com/Salvialf/JEEDOM-Widget-MultiOuvrants
They have 2 "rideau" icon set, french for curtain
do love the idea, but thats the same as the 2 states i have
I need atleast 3 pictures
open closing/opening and closed
check the archive :D
archive?
ah those arent them all
Jeedom dashboard get really ugly because of the lack of consistency in icon set, but i realy respect the work people put in it
from to
better :D
now to import this
There you are on your own.
I made a thing like this for a single wind gauge icon a while ago, but it was a template entity, not something you can easily put on every blind.
creating an icon set it something i have no clue about
I have a question regarding custom icons.
They are working perfectly on my computer, but as soon as i use something related to android, like my phone, nesthub and such ... its not visbile for some reason.
the only icons working is mdi: icons
I've added the android tv remote integration hoping that would work with controlling my tv, but it doesn't seem to work when it's for example on HDMI3
The turning on and off just doesn't work, sometimes it does and sometimes it doesn't
I'm trying to replicate the mushroom person card with the template card, but I can't get the badge icon to show for zones (Home/Away etc..) How can I do this please?
Can you show the code you're already using?
Grafana:
Does anyone know how to display the Delta in a selected time range? Basically I want my dashboard to show the water usage with one number
Anyone know how i can remove the background color of the picture card?
I tried using:
img:
card:
type: picture
card_mod:
style: |
ha-card {
padding-top: 10px
box-shadow: none;
background: none;
}
image: local/images/vehicle/mg5.png
There are online tools to remove backgrounds and add transparency. I used https://www4.lunapic.com/editor/?action=transparent which didn't do a great job but it is a start.
It's not the picture, there is a background in the card somewhere but I can't remove it.
The picture itself is a PNG with no background
Do you have the Picture card inside another card? In a Grid card, background: none works for me; used red for testing and it shows red.
Yes, inside a button card. But I removed the background from that button card as well
I can baste the code in 2 minutes
This is in dark mode, just to show that the picture background is transperant 🙂
I think the problem is trying to apply the card_mod to card in a custom_field. With that said, try replacing the Picture card with another cusom:button-card and adding Styles to it.
I managed to fix it with adding the picture as background to the main custom:card:
card:
- background-position: center 150px;
- background-image: url(/local/images/vehicle/mg5.png)
- background-repeat: no-repeat
- background-size: contain
- background-color: transparent !important
Hey Guys, im experimenting with the Plotty Graph. Is there any way to change the width and hight of the individual card. I want it to fill the screen for better analysis. 🙂 Thanks 🙂
i do belive the layout card would help you here
what is the layout card?
It is basically a life saving card 🙂
https://github.com/thomasloven/lovelace-layout-card
I'll taka a look imediatly 🙂
I`m not the best with using it myself, but there are plenty of examples on there or the community forum to read... and some really nice persons in here with the knowledge to help you out 🙂
I don't why yours did not work because mine does.
type: picture
card_mod:
style: |
ha-card {
box-shadow: none;
background: red;
z-index: 2;
}
and they look identical from what I can see
but if you put in backround: none; does that work?
for me it picked up the background of the card
yes, none works fine
its because the button card loves you and not me!
the love is mutual 🙂
add this and play around..
layout:
height: 400
width: 500
margin:
t: 30
l: 45
r: 30
b: 50
Looks like this only changes the size of the diagram. Strangely, if I change the height the card gets longer and longer, if I change the width it always maxed out at 500....
ah... you want the card to spread over multiple HA columns?
i.e. wider than 1 column
indeed my suggestion is withon the plotly card itseld, it will not resize beyond, layout card I guess... will give it a try myself now as well
Okay, via layout, it works now! 🤩
How can I create a chart of some sensor values? I only can choose mean, max or min, but i just want to see the values itself in the chart using the statistics chart card
statistics GRAPH card has more options, e.g. 'state' which you seem to want 🙂
Do you know how these cards are made? What was used, lovelace?
where is the screenshot from? 🙂
I do belive its a custom:button-card
This is a Chinese website, You can see open https://www.bilibili.com/video/BV1zT411H7Fk/?spm_id_from=333.999.0.0&vd_source=ab32c2f9a1f48efcb1762f7a77f73a59
is there a way of making the default view of the media folder/viewer list view instead of grid? (auto doesnt seem to do anything other than show it in grid)
No
Auto means it chooses default based on the content. Some content types are supposed to default to list, others grid.
ah 😦 damn. i have a folder with lots of recorded video clips and snapshots of them. having the grid view is unusable as cannot see the file name other than the first few chars.
whats the point in the grid view anyway? It doesnt show thumbnails of the files anyway (jpg & mp4 that i've got in that folder)
sometimes it does I think
I have a movies folder and I see the movie posters, in my music folder I see album art covers, etc
hmm ok well, I guess it's only for very specific file types then. surprised it doesnt do it for jpgs though. not that it really matters since it doesnt help my situation any.....do you know of any other media/file browser addon to HA ?
No, Sum, State and Change is disabled, i only can choose Mean, Min and Max 😦
Odd, I cannot replicate this with those that I know of (about 8-10 sensors) so the only thing I can come up with is that your sensor is only storing the 3 you mentioned
what sensor is this?
i.e. what is it representing
Sum/State/Change are for total class sensors, and Min/Mean/Max are for measurement
If you just want sensor values, you want history graph, not statistics graph
raw sensor values are not even stored in statistics, only aggregates
so I learned something too, thx
but...wait.. this is my water usage...which contains, as you call it ... raw values
my history is at 10d
so what is this then?
Well that's the recorded statistics.
By "raw values" I mean "every time the sensor changes we record the exact value at that second".
Statistics records one datapoint per 5 minutes (for short term), or per hour (long term).
ah...OK...yeah..that I knew...
so depending on how one configured the sensor it can either have min/max/mean or state/sum/change, never all
measurement vs. total/total_increasing?
yes
ok...just not keeping up with all the options ...there is sooo much to think of 🤪
Does anyone know why custom icons like fontawesome and such only work on my computer, and not when i cast it to a chromecast or use the app ?
AH I see now. I did not see that the history chart can display line charts 😄
Ah now I got it
the statistics chart can show a mean e.g. for an hour. The raw values look. wild 😄
I'm using the custom auto-entities card to list all people so that I can add buttons to change ringer settings. The buttons work fine, but I would like to add the current state of the ringer. I'm able to extract the first device tracker listed on the person (I'm the only one with more than one anyway), so I have the entity ID of it. But I don't know how to use that value inside of another template. To keep it simple, here's the part that lists the person and associated device tracker.
type: custom:mushroom-title-card
title: '{{ states.this.entity_id.name }}'
subtitle: '{{ state_attr(''this.entity_id'', ''device_trackers'')[0] }}'
What I need to do is get the value of the subtitle line as the entity ID to pull the state.
I like this layout and dashboard.. Mind sharing your config? 😁
I would start here: https://github.com/fredrikpersson92/minihass
Essentially what I'm asking is: how do I use the result of one template in another?
thanks mate
Is there any way to sort to-do lists by due date?
is it possible to ask for 2 or 3 states in one if?
Trying to add some information to a custom_field in a button card.
I got: if( variables.engine == "on") to work, but not sure how to add more.
What i am trying to do, is to ask if the
if variabes.engine = off AND variables.charging = on AND variables.cable = on return: Vehicle is parked, currently charging.
elseif variables.engine = off AND variables.charging = off AND variables.cable = plugged-in, return: Vehicle parked, plugged in but not charging.
else return Vehicle parked, not plugged in.
Hi, my media-control cards just disappeared. I have no idea why, do you know how to fix that?
Did you try exactly that?
It's JavaScript, with infinite resources on the web
Does anyone know if the UI (whether it be shown on a browser or Android) has a build in sort of full auto-refresh built in. I am noticing for example if I close the android app and reopen it sometime soon afterwards, or on PC/chrome browser leave a homeassistant tab idle for a few minutes and go back to it, there's a noticeable flicker/refresh that seems to happen once I return to that tab.
Its quite fast, but still not something I would expect to see in a perfect world. Just wondering if it is the case that this is there, is it a possible improvement I could/should log to see if it can be improved/removed?
anyone did a sankey chart ?
ive managed to get the card working, but its too narrrow
i want it wider , side to side entire dash view
Hi, new here...i've searched everywhere online and can't find the answer. How do I replicate the user/location cards in a custom dashboard? I mean the ones that show up on the default dashboard where it looks like some type of grid and it shows the user's photos in square boxes with their location overlaid on top like "Home". I can't seem to replicate it.
Like this ^^
Nevermind, finally figured out how to get to the raw source for the managed dashboards
@buoyant furnacepanel: true for the view setting will expand the view to screen size...in most cases
Great thanks.
And regarding the date selection option.
How do i put it in the code?
It says i need to add the card type as well. Not sure how to do 2 cards in one
With the raw configuration open for the view, it would begin like this:
title: Garage
path: garage
icon: mdi:garage
panel: true
cards:
- type: picture-entity
entity: camera.garage_cam
camera_view: live
...except the first card would be what you want to use. In order to use 2 cards or more in a panel view, you'd have to start with a vertical-stack or horizontal-stack and put your cards in one of those. Not sure what you are trying to do. That would use the entire view as one unit
No i mean this
The date selection function
didnt work btw, ended up using layout card to expand the width on the dash level
Hi, how to align cards in a horizontal card of the lovelace-layout-plugin to the left?
Anyone here that runs a dashboard cast to a google hub max? I am wondering how to get the sidebar working or should i just use CATT
hello, is it possbile to change a entity (switch) in a entites card from 2 lightnings buttons into a switch or button?
I tried the following:
But no joy, I try to read some guides but this stuff is out of my league 🤣
Is there someway to disable the new scrolling to the bottom when you complete a task on shopping list?(maybe with card-mod?) It drives both me and my wife insane that it started doing that with the “improved” shopping list update 😅
Hi, struggeling to change icon based on entity state. It's about climate.xxx. The status is off or heat or something else. If the state is off I'd like to show mdi:radiator-off, if it is something else: radiator.
I use a mushroom card and used:
entity: climate.keuken
layout: vertical
show_temperature_control: true
icon: |-
{% if is_state(entity, 'off') %}
mdi:radiator-off
{% else %}
mdi:radiator
{% endif %}```Why this doesn't work? The icon remains empty at all.
@clever plover Most of the Mushroom cards cannot be templated. In order to use templates, you have to use the template versions of the card. custom:mushroom-template-cardor the template chip.
Thanks, but not easy for a climate entity with control
You should be able to apply the same concept but by using card_mod. Check out this forum post.
I know this page to change the icons color or other things but it seems it doesn't work conditional
@clever plover yaml type: custom:mushroom-climate-card entity: climate.heatpump layout: vertical show_temperature_control: true card_mod: style: | ha-state-icon { {% if is_state(config.entity, 'off') %} --card-mod-icon: mdi:radiator-off {% else %} --card-mod-icon: mdi:radiator {% endif %}; }
Wow great, thanks. That was exactly I was looking for!
It's so nice if you know all these 'tricks'...
I one question: any idea if the written state 'Heat' - 'Off' can be hidden?
@clever plover yaml card_mod: style: | ha-state-icon { {% if is_state(config.entity, 'off') %} --card-mod-icon: mdi:radiator-off {% else %} --card-mod-icon: mdi:radiator; animation: clip 1.5s linear infinite; {% endif %}; } @keyframes clip { 0% { clip-path: inset(50% 0 0 0); } 100% { clip-path: inset(0 0 0 0); } }
secondary_info: none
Thanks but than the temperature is also gone...
I'm not sure how to change the actual value. I can see that it is stored in span.secondary but it looks like the card renders the value that gets plugged in there. Looking at the code for the card, I believe this is handled at Line 165.
The animation is very nice but it won't work in my case. The icon changes but no animation
@hard blaze I converted your message into a file since it's above 15 lines :+1:
never mind
Looking for a bit of help. I'm looking to replicate this in HA dashboard using the custom button card
I am pretty confident that I can modify the code for pulling information for my system clock and weather data from HA via the code examples for custom fields. What I don't understand is the css grid set up.
I found a website that allows me to visually set things up and I think I'm on the right path.
Can the CSS that is generated in the right be used directly with the custom button card? Do I need to change the '.' values to 'blank'? Do those blank cells need to have some sort of filler for them to exist? something like the ' ' html ?
Any examples outside of the ones from the custom button card readme would be appreciated. I've tried a few things over the past week but haven't really gotten anywhere in terms of placement so could use a push in the right direction. I have not tried using the CSS from the image above yet.
bonus points for help on ensuring the card takes up the entire view and has a background image that takes up the entire space as well
That part is easy. Set the View Configuration's View Type to Panel (1 card) and then add the custom:button-card.
For the background, you'll need to put this into the Raw Configuration in the View section. Check out this post. You may have to play with the specifics to get it to fit your image properly but this should get you started.
background: center / cover no-repeat url("/local/money.jpg") fixed
Thanks so much for this! One step at a time 🙂
Hey everyone 🙂
Does anybody know how to hide the label in an input_text helper?
I know how to set it to transparent via --mdc-text-field-label-ink-color but I would like to remove/disable it instead.
And maybe, since I simply cannot find a working solution: is it possible to auto-scroll the content when it exceeds the width?
Almost correct. It works, bit it’s more complicated than it has to be. You only need 2 columns and not 4.
Does anyone have an example dashboard that looks something like this? I'm trying to make a custom width and height but unfortunately it doesn't work.
My code: https://pastebin.com/W4m8R7jD
width: 300
height: 400```I even tried adding this to the image on the right, but it still doesn't help.
Thanks for this. So you are suggesting two columns by 3 rows?
Top row: col1: weather col2: alarm
Mid row: col1: time col2: time
Bot row: col1: footer col2:footer
Something like that? Then use justify/align to get things where I want them? What about those empty footer cells? Do I need to put something in them at all?
Well you need to put "Sat, June 22" on the last row. so....
- grid-template-areas: '"weather alarm" "time time" "date date"'
- grid-template-columns: 1fr 1fr
- grid-template-rows: 1fr min-content 1fr
this will give first and last row the same height, and also place the time centered vertically
I cheated. Not using grid-layout. Just used top and left values for the custom fields. Working on formatting the alarm time right now then adding the weather icon handling.
position: absolute for the custom_fields, right?
Yup
yes maybe that's easier sometimes
Thanks for this. I'll give it a try in just a bit
Nice as well. Could you share code when you are done?
All of this is super helpful. Thanks!
Hi.
Is it possible to use the custom code for SVG icon inside my button card?
yes I tried it here once
could not figure out exaclty what did what though so gave it up haha
nice! i hope this helps, because i have issues with other devices loading installed custom icons, its only visible on computer.
Hope this helps
Just be aware that you can't push variables into the SVG code. (So you can't make a variable that evaluates a state to determine a color for the SVG to render.) You could probably create the IF and then render each SVG based on the state (on would have hard-coded green color; off would be hard-coded red.)
its fine 🙂 I`m just looking for one spesific SVG
Working on formatting the alarm time right
Got this working but now my brain hurts. 🤕
alarm: |
[[[
var alarm_time = new Date(states["sensor.bedroom_dot_next_alarm"].state)
var alarm_time_formatted = (alarm_time.getHours() < 10 ? '0' : '') + alarm_time.getHours() + ":" + (alarm_time.getMinutes() < 10 ? '0' : '') + alarm_time.getMinutes()
return `<ha-icon icon="mdi:alarm" style="width: 50px; height: 50px; color: white;"></ha-icon>
<span>${alarm_time_formatted}</span>`
]]]```
haha nice
i would like to know how to add custom hacs installed stuff thrue the yaml config correctly though.
Is the right way to do it in the dashboard.yaml or the configuration.yaml?
i have this in my dashboard.yaml
lovelace:
mode: yaml
resources:
- url: /hacsfiles/hass-swipe-navigation/swipe-navigation.js?v=1.0.0
type: module
- url: /hacsfiles/custom-brand-icons/custom-brand-icons.js
type: js
add the following section to your configuration.yaml and restart Home Assistant:
I am a bit stuck.
I modified a markdown card but for some reason it is not taking. Can somebody tell me where to look/what I could be missing, please?
padding: 0 0 0 0 !important;
padding: 0 !important; should also work? if im not wrong, using only padding: 0, it will apply to all 4 sides
I think you're correct. I just like putting all four side, primarily so I don't forget. yaml padding-top: 15px; padding-right: 15px; padding-left: 15px; padding-bottom: 15px;is also an option.
Thank you both! That was it.
MAy I ask how I can tell when I need !important and when I do not?
Same for me. 🙂
That can also apply to various margin, border, box-shadow, and other options.
Generally where you want to override a more specific rule with a less specific one.
To combine with your earlier question, padding:0 is less specific than padding:0 0 0 0, but then there are also other precedence rules relating to from where the rule is applied.
It's all a bit gross at the best of times, and because of the way HA uses Shadow DOM it gets a bit messy. Probably safest to just over-use the !important on everything to make sure it gets applied.
Thank you, I will do that in the future. Frustrating when you think "I am sure this is correct! Why is it not working?!?" 😄
@scenic current I converted your message into a file since it's above 15 lines :+1:
So I'm attempting this and I'm not sure how the placement is supposed to happen. I'm getting things stacked on top of each other. Both alarm and time are showing in the bottom right corner
I faked the time by just copying the custom_field code for alarm and put in a time of 22:00 just to see. Also the icon and name is from the entity: weather.home
I just commented out the entity information and now it's just showing the alarm and the time stacked on top of each other. I don't understand how I 'assign' the custom field variables to their template areas
styles:
custom_fields:
alarm:
- align-self: start
- justify-self: end
time:
- align-self: center
- justify-self: start
Do I need to also set custom_fields within styles?
grid-template-columns: 1fr 1fr
grid-template-rows: 1fr 1fr
grid-template-areas: |
"Weather Weather"
"time date"
@scenic current depends if i read the info right hehe
That will give you weather on top, then time left, date right.
Is there a way of checking if a module was loaded as lovelace resource or as frontend module? I would like to check if switching card_mod to frontend module worked or not.
Probably maaany more ways (and much easier), but put in a picture card, and try to add background color to it with card_mod.
or another card... picture card just came to my head, as i just fixed a card with it hehe
But that will work whether it is loaded as a resource after installing with HACS as well.
I have card_mod installed and running. I just wanted to switch it to frontend module
ah got yah, then i cant answer you 🙂 sorry
Thanks for the help but I don't know what's wrong with the way I have it. One way or the other, I can't see where alarm and time should ever overlap if they are being placed in the correct cells as I specified above.
usually when that happens, is when the grid is not setup correctly. did you try the way i stated ?
#1185873894159171605 message if you look at this thread, I got some help with gridding from Fredrik, might help
If you have it in the same row, you might need to justify the position to start and end
Share your full code please
I get the same when I did not define the grid properly or did not set the grid placement in the card.
Make sure you got the caps correct also.
Maybe post your full code?
Do you always define the rows or is this a special case? I usually leave it at auto.
Just out of curiosity 🙂
It really depends.. but mostly yes. And I don't know why 🤣 habits I guess
is there a way to modify a code more easily ? i have a bunch of code i need to remove 4 spaces at the start of each row in order to add it to a different view
how do i do this
Highlight, shift tab
i dont follow
You're asking how to use an editor?
asking if theres an easy way to remove x amount of spaces at the start of each row, i find that i have to do this often when moving cards around the dash or from different views
Did you try what I suggested?
If referring to a file/code editor, Rob is suggesting you click and drag to select multiple lines or rows of code and then press the Shift + Tab keyboard keys to remove spaces. Tab alone adds spaces.
Ctrl or Command + / is [un]comment a line
regarding webrtc, im using the card to display a camera stream, it sometimes a bit hard on my tablet i believe, is there a way to make it show snapshots on the main display, say every 10sec take a snapshot and show that on the card, and if i click the snapshot it will open up the live stream ?
im using this one https://github.com/AlexxIT/WebRTC
I can’t start updates from the web GUI with lockdown mode enabled on iOS
Doesn’t work in the app either. Update notifications show but clicking on them doesn’t do anything
The login page seems to be at least fixed in 2024.1
Disabling lockdown mode in Safari fixes it but that doesn’t solve the problem in the app
@scenic current Still a work in progress but it is getting there. https://github.com/dsellers1/home-assistant/tree/main/echo-show-screensaver
Is there a way to add the climate turn_on service as a button to the climate tile? The tile is almost perfect, but my Samsung AC needs to use the climate turn on function, it cannot turn on directly in another mode.
E.g, if it's heating and I turn it off, then I press the "cooling" button, it will turn on but it will still be in heating even though HA thinks it's cooling, so I have to click on another mode, then back again to cooling
If I use the climate turn_on service, it properly turns on and remembers what mode it's actually on
Did you try the features parameter?
https://www.home-assistant.io/dashboards/thermostat/#features
Does anybody know why links in markdown cards take so long to show up?
I am using templating but other cards don't seem to be slowed down that much by it.
- type: custom:card-templater
view_layout:
grid-area: hellofresh1
card:
type: markdown
content_template: |-
{{ "[HelloFresh](https://www.hellofresh.de/recipes/search?q=" +
states('input_text.meals_1').replace(" ","+") + ")" }}```
Yes, I do have that, but the button on the right only turns it off for me, doesn't turn it back on
its just an off button, if I click it again nothing happens. In the 2nd screenshot it was after spam clicking multiple times, but it still shows as "off" in the tooltip so I assume it's just an off button
Hello, I have this button on my dashboard
- show_name: true
show_icon: true
type: button
tap_action:
action: toggle
entity: switch.sonoff_1001e6a47a
name: Smart Plug
show_state: true
icon_height: 100px
theme: noctis
icon: mdi:power-plug
And I was wondering, how can I change the icon on toggle?
On icon - mdi:power-plug
Off icon - mdi:power-plug-off
But isn't the opposite of 'off' one of the modes?
So, 'off' will switch off all modes but 'on' is either 'heat' or 'cool' or whatever
For my climate device off will switch everythinf off. But on is in fact called heat. And heat is a separate button.
So on/off is not a toggle in climate. At least not for me.
P.S.: and if your room conditioner has cooling and heating, there may be a mode called 'auto' which would represent the "on" mode best?
I said this in my original message "my Samsung AC needs to use the climate turn on function, it cannot turn on directly in another mode.
E.g, if it's heating and I turn it off, then I press the "cooling" button, it will turn on but it will still be in heating even though HA thinks it's cooling, so I have to click on another mode, then back again to cooling"
I have to remember what mode it was on before and press that mode directly to properly turn it on, or if I press on the wrong mode I have to change the mode again. I can't turn it on directly in my desired mode
As a workaround I have a button next to it that just calls climate service turn on, which works perfectly! But I figured there must have been a way to get an "on" button there and I was just missing it
That sounds like a mistake in the integration. Or did you manually create an MQTT HVAC device?
Thanks, works perfectly! ❤️
I'm using the official smartthings integration
Is there a way to make a notification go away only after a certain trigger has been performed?
I have an automation made for our washing machine, which gives a notification once it's done. I want the notification to only go way once we've been in that room (which can be monitored by a presence sensor which I'll be installing soon)
Hi, how can I remove the frame from e.g. a markdown card? In this case I just want to see the text, but no frame.
You can style ha-markdown with card_mod
Any ideas?
thx
You might be able to fix this with an automation. When the button is pressed, a service call is made, and that fires an event.
So you could say if the climate is off, and you detect that service_call event to turn on "cooling mode", wait a half second, and then call a second service to set the correct mode.
But to your original question, no I don't think you can add extra buttons to the climate tile card.
I can't manage to change the text color of a tile card with the card_mod
cards:
- type: tile
entity: binary_sensor.schiebetur
show_entity_picture: true
vertical: false
name: sliding door
card_mod:
style: |
ha-card {
color: white;
background: black;
width: 200px;
}
hey there everyone. how can i make a sensor into a graph on the lovelace interface? i managed to do it, but getting the options between average, minimum and maximum value per max interval of 5 minutes. How do i make this graph every 1s instead of 5minutes, and show the last 5 or 10mins, and show the value it reported at that time instead of average, minimum or maximum?
this is it now... https://i.imgur.com/pMFAnRO.png
the other values for the graph are greyed out...and the period has to be 5 minutes minimum... https://i.imgur.com/XwHNHvM.png
and this is the mqtt sensor:
sensor:
- name: "Living Room Audio Sensor (75=silence)"
state_topic: "frigate/living-room/audio/rms"
device_class: sound_pressure
state_class: measurement
value_template: "{{ ((value | float) | round(2)) }}"```
(in configuration.yaml)
i noticed the history graph works alright, but shows the last 1h as minimum...is there a way to override that?
Tile card card_mod
What is the correct syntax if I want to write javascript in a button card? For an example, I want to return different value in the "counter" variable. In my dashboard I have this:
- type: "custom:button-card"
template:
- custom_card_garbage_collection
variables:
label: test label
counter: >
now().isocalendar().week % 2 ? 1 : 2
entity: input_boolean.garbage_collection_collected
The now().isocalendar().week % 2 ? 1 : 2 gets printed in the dashboard as well. Somewhere I saw the pipe | instead of > but nothing really makes it possible to execute the javascript. How should I write it?
Did you review the docs for that card?
Data/Time in JavaScript is a PITA... I was working with it yesterday: #frontend-archived message.
What are you trying to calculate for the counter?
I want to see if the weeks are even or not. If it's a even week then it should return 1 or if it's an odd week it should return 2
But the javascript works, I tried it. But my problem is that it doesn't executing the javascript.
Again, have you looked at the docs?
found out some problems. Used jinja code, at least now().isocalendar().week and and found the docs for the custom button card for writing javascript. So now I only need to found out how to get the weeks in javascript
Yes. You said that 'the JavaScript works', so 🤔
That makes sense why I couldn't get .isocalender() to work. This returns an Odd/Even status. (I couldn't get the modulus (%) to work properly so I went this route.) yaml type: custom:button-card name: | [[[ var currentDate = new Date(); var startDate = new Date(currentDate.getFullYear(), 0, 1); let days = Math.floor((currentDate - startDate) / (24 * 60 * 60 * 1000)); let weekNumber = Math.ceil(days / 7); return (weekNumber | 1) === weekNumber ? 'Odd' : 'Even'; ]]]
@bitter bolt I converted your message into a file since it's above 15 lines :+1:
whats wrong with above code not showing code colorized? someone in another channel said cardmod had a breaking change when updated?
card_mod:
style: |
...styles go here...```
I am trying to add a background to one of my dashboards. I have the .jpeg image I want to use in my config/www/images folder. How do I get that into my dash?
Is that done in my config.yaml or thru the edit dashbord yaml?
I mentioned this to someone yesterday: #frontend-archived message
Your URL is going to be /local/images/name_of_pic.jpeg.
dashboard.yaml
To fast on that keyboard 😛
I used:
title: Dashboard
background: "var(--background-image)"
And placed my background image in the theme 🙂
or Fredrik did, i kind of kopied his yaml hehe
Ok, that worked! Now, If I wanted to add a background to individual mushroom cards. Where does that config go? Again I have my files in the images folder. Actually I used background: center / cover no-repeat url("/local/images/backday.jpeg")
For example, I am using a mini graph card
hey everyone what does this question mark means that is on the user profile when they log in
unavailable
I want to have an entity on the HA UI that indicates the on/off state of an outlet. I do not want the outlet to be easily turned on or off, mainly just show the state. Using custom:mushroom-entity-card, it shows the icon as light blue when it is on, and grey when off. I want to change the on-state colour to green to make it more obvious. I have tried many different incarnations, but nothing worked. Current option (not working) shown below. Is there any link or doco that is valid for the current version of the UI that would show me how to do this? Thanks
- type: custom:mushroom-entity-card
entity: switch.meross_plug_07_outlet
name: Desk
icon: mdi:desk
icon_color: >
if (state === 'on') return [0,255,00];
return [0,0,255]
Mushroom cards generally cannot be templated. For that, you have to use the Mushroom Template card (or Template chip). With the template cards, you have to define every little thing in them. Take a look at this example for its usage that you're trying to accomplish: Mushroom template card with simple icon color and icon
Card modding is another option.
card_mod:
style: |
:host {
--mush-icon-size: 60px;
--card-primary-font-size: 20px !important;
--card-secondary-font-size: 10px !important;
}
ha-state-icon {
--icon-color: black !important;
--icon-color-disabled: pink !important;
}
mushroom-shape-icon {
--shape-color: red !important;
--shape-color-disabled: none !important;}
}```
I appreciate the help @tribal galleon ! That does the trick nicely
hopefully an easy one. I'm making a dashboard using standard Lovelace dashboard and was wondering how I can have 1 column vertical stack and then the rest of the page a double width column (vertical stack), if that makes sense?
@tribal galleon , is there any documentation on how I can create those card-mod styles? I want to apply the colour change to a text entity, currently displayed in a standard entity item on the dashboard. I want to change the colour based on the text value.
UPDATE: I got this sorted.
`
- type: custom:mushroom-template-card
primary: Server Error
secondary: |-
{{ states('input_text.server_error') }}
icon: |-
{% if is_state('input_text.server_error','none') %}
mdi:emoticon-cool
{% else %}
mdi:exclamation-thick
{% endif %}
entity: input_text.server_error
icon_color: |-
{% if is_state('input_text.server_error','none') %}
grey
{% else %}
red
{% endif %}
tap_action:
action: more-info
multiline_secondary: false
card_mod:
style: |
:host {
--mush-icon-size: 50px;
--card-primary-font-size: 15px !important;
--card-secondary-font-size: 27px !important;
}
`
Still, if anyone knows the best links for documentation on card-mod, and mushroom cards, I would love to get those. Mostly I am seeing question and answers in forums when searching. Cheers. If I can change the text itself, that would be great, although the ICON change above is good enough.
entity: input_select.choose_speaker
name: сustom (method 2)
card_mod:
style: |-
ha-select $: |-
span#label {
--mdc-select-label-ink-color: red;
--mdc-theme-primary: pink;
}
span.mdc-select__selected-text {
color: pink !important;
}
:host {
--paper-item-icon-color: rgba(82, 22, 8, 1);
}
When i add
:host {
--paper-item-icon-color: rgba(82, 22, 8, 1);
}
ha-select $: |- don't changing color
only use each style ha-select $: |- or :host {
how to change all color for input_select
@silent wind I converted your message into a file since it's above 15 lines :+1:
coz when i tried the mushroom card auto designer dashboard strategy thingy it made it like that i find it really cool
or do i need to key in the url section myself?
what do i need to add to make it stop showing that?
nvm adding url made it work
Color of label, selected is ok
entity: input_select.choose_speaker
name: сustom (method 2)
card_mod:
style: |-
ha-select $: |-
span#label {
--mdc-select-label-ink-color: red;
--mdc-theme-primary: pink;
}
span.mdc-select__selected-text {
color: pink !important;
}
when i add
:host {
--paper-item-icon-color: rgba(82, 22, 8, 1);
}
then Color of label, selected come back to default.
where do i add this i'm lost
@silent wind I converted your message into a file since it's above 15 lines :+1:
Is there a way to run loaded resources on dashboard? Right now I have a js file that has new Snowflakes(); command in it. I would like to take this out of the javascript file and have this behind a helper to start and stop it easily..
How to change color of slider
I tried bellow but not affected
type: entities
entities:
- entity: input_number.battery_level_check
name: Сolored slider
style:
hui-generic-entity-row: |
.flex ha-slider {
--paper-slider-active-color: orange;
--paper-slider-knob-color: green;
--paper-slider-container-color: cyan;
}
type: entities
entities:
- entity: input_number.battery_level_check
name: Сolored slider
style:
hui-generic-entity-row: |
.flex ha-slider {
--paper-slider-active-color: orange;
--paper-slider-knob-color: green;
--paper-slider-container-color: cyan;
}
you are using card_mod wrong. check the latest update
@golden mirage coloring the slider recently changed. If you're looking at examples more than six months old, they're not going to work.
Because each card can be different in how they're coded, there's no one size fits all documentation (other than the card-mod doc itself.) The Mushroom card thread is a good place to start although it has over 9k posts.
Check out the section What the $ and .: | symbols do in this post.
@pseudo verge good stuff to reference in this thread too.
I changed to
entity: input_number.volume_music_slider
name: Сolored slider
card_mod:
style:
hui-generic-entity-row: |
.flex ha-slider {
--paper-slider-active-color: orange;
--paper-slider-knob-color: green;
--paper-slider-container-color: cyan;
}
But nothing change
Can you show me how it has changed?
| NOTE: card-mod only works on cards that contain a ha-card element.
https://github.com/thomasloven/lovelace-card-mod?tab=readme-ov-file#styling-cards
"hui-generic-entity-row" is not a class card-mod can work with.
(But I believe card-mod is not what you're looking for in your case ?)
Hello! ```
Can someone help me with the floor plan card?
Thanks
(But I believe card-mod is not what you're looking for in your case ?)
Card mod modifies the visible portions of a card. The layout and conditional cards are not actually visible. That's what was being referred to about the ha-card. Card mod works on everything else.
I've worked with the slider in entity-slider-row. I'm not sure if it will directly translate but might give you a decent start. I'll drop the code in a thread in a minute. (At work.)
@golden mirage follow the links from this message. Code posted there.
#frontend-archived message
Thanks
is there any way to edit these favorite colors across all my light devices? i want to add in my own set but not 50 times manually.
This is probably a dumb quesiton, but I jsut installed a frontend through HACS (https://github.com/PiotrMachowski/lovelace-xiaomi-vacuum-map-card) and I'm not sure how to access/configure this. I think I added this card to the lovelace resources link, and refreshed the browser, but not sure if i'm doing something wrong or what i'm missing
The second one is broken, and looks like you just pasted a string there rather than reviewing what the fields actually mean. It also looks it was already added for you, so just remove the second line
I think the previous line was from another roborock integration (which works). I wasn't completely clear on this part of the instrucitons, so I added the new line to the dashboard link provided. This frontend is supposed to make the roborock maps better
Those are two fields that you need to fill in, not just intended to be pasted in together. Anyway, looks identical to the first one
I founded way to change slider no need install slider-entities-row
Would someone mind answering me one or two theming questions regarind card-mod themes?
I have not yet understood what the difference is between card-mod-<thing> and card-mod-<thing>-yaml. Is it "just" the syntax, i.e. if I use the "-yaml" I can copy and paste from a card into theme? Or why is there both?
Hi, how to create with the layout-card plugin a grid card which contains an arbitrary number of cards/columns and once a card does not fit on the screen I want to scroll horizontally to it? I tried:
layout:
grid-template-columns: repeat(auto-fill, 150px)
white-spaces: nowrap
so there should be only a single row, but instead of resizing the cards I want to scroll horizontally to them.
I managed to get a step further, so that a single row, but with these setting the whole dashboard gets a horizontal scrollbar and not just the relevant row:
grid-template-columns: repeat(auto-fill,minmax(160px,1fr))
grid-auto-flow: column
grid-auto-columns: minmax(160px,1fr)
overflow-x: auto
I need some help figuring mushroom weather cards out. The integration for mu country's weather service doesn't seem to have a forecast in HA and also somehow does not report any weather conditions (but that's a post for #integrations-archived message). However, met.no DOES provide an okay forecast, but the local weather isn't as on point as GeoSphere Austria (makes sense since that data is coming from a station literally a couple of blocks away).
Can I somehow make a custom card that has the numbers from GeoSphere Austria and the forecast of the met.no card?
Can you maybe define the overflow-x: auto in the rows rather than globally?
Admittedly I do not know how to achieve it and could not find the solution online either (was curious myself 🙂 )
Does someone know how I could show a simple progress line for a custom music player card?
I have several "decluttering" cards and when I define them in a dashboard they work.
But I have read it is good practice to define them in a yaml-file within the config folder and then include this file in every dashboard. like:
decluttering_templates: !include decluttering-templates.yaml
But this I cannot get to work, always getting the error, "YAMLException: unknown tag !<!include>" when saving the dashboard.
Can someone help?
You cannot use !include in a UI-managed dashboard
what do I have to do? I read, that this "works only in YAML mode" but I do not know how to switch to this mode.
Thx, sounds not the best idea to do that, especially when not 100% familiar with all the cards and it's configuration. In UI-mode it is easier to try them.
You can run both. Have one UI-controlled that you can use the editor with. Make your card ok there and then copy the coffee into the yaml dashboard. (I just recently set this up myself.)
Alright I fixed a progress bar based on the progress Spotify is giving based on media_playtime and media_position, but those attributes are not real time and updated around every 10/20 sec.
Does someone knows a fix for that? I thought about an kind of timer that starts when the song starts that just count down to the media_playtime is reached, but I have no clue how to do this.
Someone experience with this?
Hello. How to change the icon color depends on the sensor , which value is already a hex color
Hi. why cant i get the theme setting for a user to stick ? it resets when user gets logged out and in again 😦
You use the mini-media-player, and hide everything except the progress bar 🙃
What is the fun in that? 😄
Why make it harder than it is:)
Well for one instance, I want as less custom cards as possible and installing the mini-media-player for only a progressbar is overkill imo
but if there isnt any solution to my question, than I will fall back on that card, but if there is, than its not needed
I can respect that 👌🏻
Well for one instance, I want as less custom cards as possible and installing the mini-media-player for only a progressbar is overkill imo
Any particular reason? The community makes some really good things that expand HA's capabilities.
Yeah there are really good cards out there, its not that I think those cards are bad but its mostly because of performance and clutter for me.
And beside that I really enjoy creating my own cards so it exactly matches my style. I know most cards also allow styling, but its more of a hassle for me.
So if someone could think of an solution for my question it would be appreciated!
Do you get song progress and total time exposed? If so, perhaps it would be possible to use that to build the bar. Combining the width with a calc() formula. Beyond my knowledge though
Yeah, Spotify gives an media_playtime and a progress_time, so I think if the song starts, it should use the media_playtime and start counting or something, but also beyond my knowledge for now.
I understand you want to avoid custom stuff, but consider the timer-bar-card. It is intended to be used with timer entities, but looking through the docs, I see where the times and states can be referenced (so in terms of play-time and playing/paused, etc.) so I think it could be made to work the way you want; I imagine it could be used to "count up" instead of down. It might be less "invasive" than the mini-media-player card. (I use the the timer-bar-card embedded into the bottom of custom:button-cards to show how much time is left before the lights turn off.)
Thanks! I appreciate the help. I will look into this!
can anyone point me in the right direction for this please #frontend-archived message
Speedtest is no need.
Because it becomes a burden on network bandwidth when testing.
standard lovelace masonry view does not support "double width columns". You'll need some kind of custom layout resource if you want to do that.
any recommendations? I only need it for this one project, I don't need styling or anything else... just this one simple thing 🙂
I would use layout-card,it’s in HACS. Not sure if there is even another option.
This was kind of sexy
can someone guide me on how to use theme?
i downloaded the following from hacs what do i do next?
it appears here but it didn't really change the background thou
trying to get this design
Haha thanks!
What if you set the theme globally through your user settings?
let me try that but i thought it will be for individual dashboards only
I don’t think that really matters with themes. You can set them per view (what you tried) of for the whole HA instance.
thats all i get lol
does not apply the background or anything?
it says here
thats what i did lol
Have you done this installation step?
Add the following line to your lovelace-ui.yaml or use the RAW editor:
background: var(--background-image)
yes
And themes are added to the configuration.yaml?
it added this automatically when installed from hacs
And you restarted HA after the configuration.yaml changes?
yes
do i need to reboot the vm itself?
i did that restart option
gonna do it again
still same
is it fetching the email from that site or something the base64
@silent wind iOS Themes is old and partially broken. It installs files in an old location that HACS used to use but the files can be copied to the correct location. https://github.com/basnijholt/lovelace-ios-dark-mode-theme/issues/88
I am hoping to use a mushroom template chip that on tap will "toggle" lights but its based on a sensor value
I have a sensor instance that counts the total lights on. If any lights are on, I want to call light.turn_off service on all, if not then I want to call light.turn_on on all
tap_action:
action: call-service
service: |
{% if states('sensor.lights_on_count') > 0 %}
light.turn_off
{% else %}
light.turn_on
{% endif %}
target:
entity_id: all
Is this possible at all
Shouldn’t you use “return light.turn_off”?
Not sure if the services accepts a template
Wow! Looks great. Thanks for putting in time on this and sharing. This will certainly help me figure out how this works. I plan to share the other cards I make as well and hopefully a project when I work on the automations as well.
If "all" is a light group, you only need to set your action to toggle with light.all for the entity. If any of the individual lights are on, the group will be on thus all of the lights will be turned off when pressed. If all lights are off, pressing the button will turn on all of the lights. There's no need to try to template the action to do that. Plus, like JunSnow mentioned, I don't think you can template the action. If you still want to go that route, consider calling a script.
anyone know if it is possible to add a bubble pop-up card, in yaml ? i know it was buggy before.
Finally completed my custom vehicle card! 🙂 thanks for the support @zenith stag
Hi, im not sure how to ask my question but, there something exist to monitor Home assistant add-on, integration etc.. with a lovelace for the dashboard ?
monitor what about them?
I have used it in yaml mode, only thing I noticed was that sometimes when I closed HA on mobile, the bubble card went crazy and blocked my view (had to start HA again op mobile). Fair to say that it was 2 versions ago I think.
So I would just try it, nothing to lose
Ok . I am looking for a settings popup thing., to my vehicle card. But not sure if bubble is the best option
You could also use browser mod, it also supports custom pop-up cards like bubble-card
But both cards would be fine for a settings pop-up.
If integration or add-on failed or if they have update
Notes. Thank you
I think there are already update entities for addons that will tell you if an update is available, and one that will tell you if one is running
I also thought that “spook not your homie” intergration has something like a intergration/addon update tracker, but I could be wrong and the spook intergration is not something you want, I guess.
Their docs are pretty funny to read though
I don't use HAOS, but there used to be a "Hassio" or "Supervisor" integration that came with that install and exposed a number of entities and services
RobC is right, check https://www.home-assistant.io/integrations/hassio
Hi, could someone give me some pointers about how to go about what I'm trying to achieve? I have a bathroom scale that exposes the measured weight as a sensor and I'm trying to display a graph that shows just the measurement points on the x axis, not time. Is that possible using any existing integrations/custom cards or something? I have looked into several custom graph cards, but all of them display the value of a sensor over time, and I don't want that.
When I weigh myself today and again in n days I want the measurements to be next to each other on the graph, not separated by n days of flat line
Did you check out mini-graph-card?
Or apex-charts?
I’m not sure how to accomplish what you ask, but both of them are very customizable. I’ll beat it could do what you ask.
All of what I see there in the examples is based on time on x axis from waht I recall, but I will check again
I could check tomorrow if I can replicate your question, but maybe you’ll find something or someone else could have a solution
Ooo okay I see that apex-charts has got a data_generator, this seems promising
https://pastebin.com/N7rZMDn3
Hi, is there any way I can set my pictureelements width and height? Unfortunately, this code doesn't work completely because the width is set relative to the size of the photo. I have no idea how to take such a photo yet because I don't know the width or height. Can this be changed somehow?
I would like the photo on the left to be stretched to the very bottom
Hello everyone, could you please help me with a (hopefully) simple question that I can't figure out for myself?
I'm trying to get my Deebot integrated following this tutorial: https://deebot.readthedocs.io/integrations/home-assistant/examples/ui/advanced/
I know where to place the scripts and automation, but where do I put everything else, especially the button_card_templates and the dashboard stuff? All the things I find online relate to the old yaml-based config and not the new ui-based one.
Thanks!
@scenic current I converted your message into a file since it's above 15 lines :+1:
I think card-mod should work.
I don’t think that really matters, as long as you reference to that location in the configuration.yaml
Or if you use gui mode, I think you could add it to the raw config (right in the top > three dots > edit raw config)
This is the resulting image. All elements are jumbled. I think the case is correct
Can we had a radar lovelace with the weather card ?
Can you confirm that an alarm is set on your living room echo show? If it is not set, it will return as unavailable. (I had not gotten around to putting something in that code to catch an unavailable alarm.)
I don't think your grid is being used. That's why everything is in the (technically bottom) right corner. It should be in the styles section: yaml styles: grid: - grid-template-areas: '"l" "i" "n" "s"' - grid-template-rows: min-content 1fr min-content min-content - grid-template-columns: 1fr
I am trying to animate the text inside a textfield but when I place the animation inside
ha-textfield $: |
.mdc-text-field {
the text field as a whole is animated rather than the text inside. Does anybody know how to animate the text inside the textfield?
Absolutely what I needed. Thanks for this for sure. I can handle the alarm existence/nonexistence in code. It was more the placement and now it seems like things are in order. Apologies if this is something I should have caught. I'm doing this mixed in with my real job and a bit of life mixed in too.
If you mean a rain doppler radar, I've just stuck www.rainviewer.com in an iframe card.
How to change color of button in red zone.
Thanks
Hey All, I've setup a pretty complex but simple system to control a meeting room, with a samsung galaxy tab s8 as the driving touch panel. however, i noticed that the buttons are not very responsive... upon some investigation, it appears that the home assistant interface uses the javascript click listener, which for touch screens doesn't quite work very well and it seems to want you to be very specific when you touch the screen. unlike the "ontouch" js event which understands touch events............ now with all this said, im i missing some settings or something that can make it touch friendly interface?
I have no issues at all with touch displays.
Are you using a browser or the android app?
i've used both with same results... i can confirm on the app but i think they are both like that..... have you tried to touch and slightly swipe? which is what i think is happening since its on the wall.
i can confirm that its not related to performance
If I touch and swipe the screen moves. Which is normal since the goal was to press a button. Swiping is essentially scrolling.
Maybe someone knows a solution but I am surprised people are unable to simply press a button without swiping. Especially on a non moving device.
Just tap. No need for force or movement.
yeah, i've done a html test to test this theory, it actualy makes a huge difference between click event and touch event.... its not a huge swipe but more like if you touch something its not a point click like a mouse click but there will be a slight movement. i only knew this was the problem when i was working on a larger application that we were using html/js to create touch interfaces.... i've watched people tap multiple times... including myself.
Hmmmmm, never heard of this, interesting. Never once had this myself or in my household.
Maybe some kind of delay can be defined?
You might want to ask this in the #android-archived section also. Maybe there is a setting to make the app ignore the swiping motion for people who can't tap 😉
i wonder if its only this library that i used, and maybe the actual interfaces are fine... button-card
lol... yeah i can look at the app and see if there is anything. that's what my developer told me today for this other project... i just stared at him 🙂
Maybe also disable pinch to zoom in the app. And/or gestures in the device settings.
i think im down to finding what this might be......... so the button-card hacs library that i am using has this code in their source code... i wonder if its not being used for some reason "const isTouch = 'ontouchstart' in window || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0;
interface ActionHandler extends HTMLElement {
holdTime: number;
bind(element: Element, options): void;
}"
I need some help figuring mushroom weather cards out. The integration for mu country's weather service doesn't seem to have a forecast in HA and also somehow does not report any weather conditions (but that's a post for #integrations-archived message). However, met.no DOES provide an okay forecast, but the local weather isn't as on point as GeoSphere Austria (makes sense since that data is coming from a station literally a couple of blocks away).
Can I somehow make a custom card that has the numbers from GeoSphere Austria and the forecast of the met.no card?
I feel like this should be easier or I’m missing something. When using the Picture Elements card, can you not just select a file from your media uploads as the image?
do themes not apply to everyone?
or all devices?
I does for me with this selected
you can use custom-button-card or mushroom-template-card
I'm sorry if this is the wrong place.
I'm very new to HA, have a home assistant green running since last week and love it. But I'm by no means a programmer or understand what I'm doing.
Here's my current question:
I have a GPS tracker for my dog. I can see a lot of entities from it. One is a device_tracker that has in it's history exactly the data I want to have displayed on my dashboard (and trigger an automation with it, but that's not as important right now.)
I want to see a card in the dashboard that displays how long ago my dog was outside for the last time.
The data is there. I can click the device_tracker, hover over the history and it shows me exactly what I want to see on the dashboard. But I have no idea how to get it out of there.
Is the duration shown as an attribute in the state?
Go to "Developer Tools" -> "States", select the entity and then see if it is an attribute. Maybe it is an entity itself, that would be even easier. But maybe it is an attribute.
It can then be shown in a card depending on what it is
Does anybody know how I can correctly calculate the width of the text-field?
ha-textfield $: |
.mdc-text-field__input {
font-size: calc(1em * (100% / (100% - 2px * var(--ha-textfield-input-width)))) !important;
}
I would like to adjust the font-size so it always fits inside the field. The code placement is correct and setting the font-size manually works. But I need to calculate it so it only reduces the font of text that is too long.
As far as I can see it, it is not.
Brand new to this - how do I go about it? I have to do ALL of in YAML, I guess?
Ah, okay, so a normal HA device tracker. I don't have any, so I have not done it yet.
But I could think of two options (both not so simple):
- Create a card that accepts templates for the state and then using templating to calculate the time between state change from
not_homeuntilhome. - Create a template sensor ( menu item devices & services -> helper -> template -> sensor) and do the calculation there.
Option two being a bit simpler and I am sure that someone in #templates-archived can help you with the syntax 🙂
Good morning. Looking for a good card to display multiple values (temperature) on a line. Initial thought was multiple ticks on a gauge, but the most I can get is two with the dual gauge card.
custom card multple entity row
I'll give that a shot, thanks!
If this cannot be done, does anybody know if it is possible to create an if condition to adjust the font size based on whether or not there is text-overflow?
out of curiosity, in what context will you use this? screenshot?
I have an entities card with input_text fields. Those input_texts sometimes have text that is too long for the field. I would either like to scroll the text (so far failed in doing so) or decrease the font size to make long text fit the field.
The middle one is too long. I would like to selectively decrease that rows font-size. I would like to place it in my theme to make it a global optimization.
Also tried animation, but that just moves the visible text, i.e. text that was too long is still not shown:
I see, tricky. Hope you get/find a solution 🙂 Def a valid problem
maybe setting a fixed font-size would be the best though (if scrolling animation cannot be done). I would rather have all the rows in a small font than that they vary
Thinking out loudly (no clue how to scroll).... you could possibly cut the feedback string after (say) 30char, then re-add it as section1 + \n + section2 ?
Then it should continue on line two
I have quite a few_input texts and it does not really make sense to adjust all of them. And even if I figure out the animation issue, as you can see in the gif, it makes little sense to scroll short text 🙂
I am getting a bit closer, I think.
{% if states(config.entity)|length > var(--ha-textfield-input-width)|length -%}
font-size: smaller !important;
{% endif -%}
Right now the problem is finding out what var(--ha-textfield-input-width) really returns.
Other option (I know you aim for one line) is markdown and a table..that will automatically continue on the next line
Markdown is quite slow for dynamically changing inputs. I am using markdown to create a weblink from the input_text content and it takes 2-3 sec to display the link.
Plus, the text fields should remain editable. Don't know if that works in markdown.
So, if I set the comparison value to 44 the condition becomes true for the correct fields. But that of course is a workaround for now. I need a way to get the dynamix value of that text field 😦
You're correct, it's not very user friendly. I have a PR out to add a picture uploader to the card itself, but as far as full file browsing of your images on the server, nothing like that exists yet.
Thanks for clarifying!
On my dashboard how can I change the light icons to be invisible but still be able to click on the room to turn the lights on and off? Just need a starting point and then I can probably figure it out
This is a floorplan card
Hello, little css question here
I want to reduce image height
the green css is applied on the ha-card element
but the red one does not apply on the image
also notice the URL has some height/width parameters,
any idea how I could fix that ?
maybe I need to use another parent element able to fix the height ?
thx a lot
Did you try using #img instead of image ?
Maybe an easy one here. If I add an android widget to see a status code it gives the shorthand status (eg rdy) but if I check the status code in HA it says 'Ready'. Anyway I can get the widget to show the full status that HA has/dashboard has?
Tried that, with img, style not applied, tried with the parent div, style are applied, but no impact on the img
Anyone know how to clear the notification badge on the website (not on the apps) when there are no notifications to dismiss?
wtf...i tried that before and it didn't do anything but it worked now. Thanks!
You might be able to do this with card_mod, haven't done it myself though.
I'm having a little time to look at this and have a question in regards to:
styles:
card:
- width: 1280px
- height: 800px
- background-image: url('/local/leaves.jpg')
- background-size: cover
- border-radius: 0px
- border: none
Is there an easy way to set this so that the card and background use the max screen size of the device? I guess another way of saying it is is there a way to force the image full screen and have settings for the text and icons that scales as well? I'd like to make this view work on both tablet and phone screens in landscape orientation
- width: 100vw
- height: 100vh
Im using forecast lovelace card is it possible to use another entity only for temperature ?
Awesome! Thanks. Any advice on how to size text based on varying size? Are those 'vw' and 'vh' parameters also applicable to text and images/icons?
yep. works for fonts too for certain. Most excellent!
Unfortunately not too sure how to go about getting that guy to scale along with the text
How i can change the sensor for temperature on weather-card.js <span class="temp" >${this.getUnit("temperature") == "°F" ? Math.round(stateObj.attributes.temperature) : stateObj.attributes.temperature}</span > <span class="tempc"> ${this.getUnit("temperature")}</span> </div>
style:
top: 23%
left: 38.7%
transform: scale(0.5)
'--paper-item-icon-color': green
Found this bit of code through search that seems like it might be applicable but folks saying that icons don't scale? Is this true? Same question applies for images.
I've mostly used rem as unit and so far it has worked well on all screen sizes, so try that. You can also use clamp to define a min, preffered, max value
name:
- font-size: clamp(1rem, 2rem, 3rem)
Thanks for this for sure. I'll give it a look and read up on it.
Does this same unit extend to icons and images as well?
I have found myself without a zone.home. Without any zones at all really. (I believe anyway.) In the UI, when I go to Area's, my area's populate. When I go to Zones, I see a spinning circle.
How can I add my zone.home back again?
is it possible to change the default behavior of every tile? for example I want the icon press to open more info and the main part to toggle
For anyone that finds this later, I fixed this by going to the configuration.yaml and added a random zone with random information (lookup the integration zone), reloaded yaml files, and then was able to add the Home zone. After you get the zone added, don't forget to clean up and remove the zone in the configuration.yaml.
is there a way to make dashboard cards with entities that frequently update to automatically add secondary information of last updated ??
can someone help me make this?
https://community.home-assistant.io/t/uptime-card-setup-help/605058/2
i got the entities,and the uptime installed im lost on the code part
do i need to make like 2 then add another card 2 more etc? or is it possible with code to make it all at once?
help with secondaryinfo-entity-row template
i asked this yesterday too how can or do themes apply to all users or devices?
@atomic glacier I converted your message into a file since it's above 15 lines :+1:
@silent wind Google is an awesome start 
Setting a Default Theme in Configuration:
Manually specify themes: Edit your configuration.yaml file and define your desired theme under the frontend section. This sets the theme for all devices accessing Home Assistant.
Include separate theme file: Create a dedicated themes.yaml file and include it in your configuration using themes: ! include themes.yaml. This keeps your configuration organized and allows easier theme management.
Use a dedicated themes folder: Create a folder my_themes and include all theme files within it using themes: ! include_dir_merge_named my_themes. This provides flexibility for managing a collection of themes.
but i dont want to make that particular theme permanent i got different theme for different tabs
idk if others are the same or how but i try to google stuff rather then asking anyone or try gpt or bard these days before asking but most of the home assistant stuff tutorial or question im looking answers for are from 2/3 years ago so the ui or settings are not even in the same place anymore
I think that is only possible with custom:button-card
You can set a theme per view. Just edit the view and select the theme you want.
How do I get the old UI back? Where did my temperature control go?
for theming you can find docs that explain themes per view.
But if you only have small stuff, maybe decluttering card is easier?
If you have a vertical stack and a horizontal stack you can have uneven numbers. Not a problem.
You can also use a grid instead and place wherever you like.
If you want to auto populate you can use auto-entities.
That looks like you made the card manually. Did you remove Temperature somehow? You used to see Temperature before the update?
Yes you can do that in the tile card
Just change the actions for the icon tap action and tap action
auto entities? so i just gotta select the entities for it ?
Huh. Definitely possible. I am not sure. It'd be good if there was a way to view history on the UI
is what I have now. Better, still no temperature though.
Does the AC entity output a temperature attribute?
With auto-entities you simply enter a filter and then all entities matching that filter will be added.
It can be tricky in complex card strutures, but it almost always works.
Just to make sure, I will repeat my other question: you did see a temperature in the past?
Because the climate entity needs to report a temperature attribute for you to be able to see it.
If you go to developer options and then states and select your climate entity, it should look something like this:
If it does not have the attribute temperature, you will not see the setpoint. And current_temperature if it has a sensor that measures current temperature.
what card is this? I've got some troubles with "better themostat ui" in combo with dwains dashboard, this one looks also good
Is there something like a compact alternative for the entities card? Couldn’t find anything usefull. I just want a „list“ as compact as possible. The gaps between the lines in the standard entities card is a bit to big for me
As far as I can see, its just the default climate card from HA. But it can look different with Dwains theme I guess.
it looks completely different from what I see 🤔 I wil ldig into it
Default HA thermostat card. The team updated it quite a bit 👍
Whats the best way to auto size?
im using custom:Button-card
I wanna have it the same size as this
#frontend-archived message
I'm trying to filter out entities that have device_class occupancy, and state on (meaning detected) using auto-entities. If I just use attributes for device_class it lists all the right ones, but if I add second filter of state, no matter what I set it to, all the entities are hidden.
anyone know a good way to visually show when you interact with an icon? I have an icon that doesn't necessarily change states immediately when I press it (garage door) so it would be nice to add some sort of feedback that it actually registered your input.
like quickly swapping colour back and forth or something
Check Custom:button-card
you can change the images when its going up
or down
only takes a bit of figuring out, but when you have it its soo nice
I already have different icons for closed/open etc, but I can only tell by sensor status if it's closed or not. so there is no way to reliably tell if it's opening or just open
yes, but I'm asking for something more specific than that :p
you can set the haptic resonse on mobile (see the config options). it would be the simplest of all, and atually responding to the action, and not as much the state of the controlled entity
like:```
action_default:
tap_action:
action: toggle
haptic: light
hold_action:
action: more-info
haptic: success
ofc this is mobile only
This should do that
type: custom:button-card
styles:
card:
- height: 100%
ah lol that easy
do you also know how layouts work?
I do know something about layouts
Do you try to replicate that mushroom/tile card with button-card?
yea
There are already projects that have the code in button-card
If you have a moment I can give you an easy example of the lay-out structure
yea i want a tat more freedom in customizing, but i also like the layout of mushroom
like for example i want to change the icon when im sleeping to the bed icon with the zzz above it
You could also look at the UI Lovelace Minimalist which mushroom is actually mostly based on
Does someone know how I can add a icon to this label? label: '[[[ return mdi:tea + states[entity.entity_id].attributes.current_temperature + "°C" ]]]' or is it more a template question?
You cant add mdi icons in a field which expects a string
Thought so already, alright, thanks!
im using this
state:
- operator: template
value: |
[[[
return states['cover.curtains'].state === 'opening';
]]]
icon: mdi:curtains
color: '#ffffff'
thats if u wanna apply a icon if something goes to a state
my state is opening
Yeah but I want it next to the label, its not really about a state.
did you have 1 :)?
@lyric prairie I converted your message into a file since it's above 15 lines :+1:
You can adjust the grid areas though to set the icon next to the label
@jade tendon Here you go
mine looks like this XD
what software do people use to build an 2d image/schematics of their home?
Hello! Is it possible to have a room card ( in this case a custom button card ) light up, like a box shadow or icon when a light in that room is turned on. Is there a way to do that?
box shadow ? do you have a example?
I think you can use the state: property and than something like
styles:
card:
- box-shadow: <something>
state:
- value: 'on'
styles:
card:
- '--paper-card-background-color': rgba(40, 40, 40)
- box-shadow: 0px 0px 10px 3px var(--button-card-light-color)
that is my current for the lights in the rooms.
can you not use this
you could just use -background instead of --paper-card-background-color' right?
Or am I wrong?
yeah i could use that.
i guess this only works when you have other cards with a specific hieght
because when i removed the mushroom card it destroyed its own height XD
That's true; height: 100% takes over the height of the parent div. Which was your stack with that mushroom card
100% is like this now
hmm ok so i just need to give 1 card the height
and all others can be 100%
your example looks fine, does it not work?
no, it only works for entities it seems, not when the button card is set to navigate to a subview.
I think you could just add the entity to the card, use tap_action to navigate and hide things you don't want to see from the entity.
do you know how i can get the text closer to the icon ?
Uhm you use a layout template so you should experiment with the grid-column-areas
styles:
grid:
- grid-column-areas: 'min-content auto'
But the example I posted does that already for you
yea, but you use a enttiy and mine needs to be a button
it opens a bubble popup
its for my mobile view
Something like this:
type: custom:button-card
aspect_ratio: 10/7
show_icon: false
entity: light.sfeer_woonkamer
state:
- value: 'on'
styles:
card:
- box-shadow: <some box-shadow>
tap_action: navigate
navigation_path: <to somewhere>
and entity could also be a group of lights or a sensor.
than remove the entity and add an icon, name and label
- type: "custom:button-card"
name: this is my name
icon: mdi:lightbulb
styles:
@jade tendon I converted your message into a file since it's above 15 lines :+1:
ah yes i see
This is how it looks for the lights etc.
fancy
But i tried adding the entities to the room card as junsnow posted but dont work.
Post your card code
@jade tendon I converted your message into a file since it's above 15 lines :+1:
@lyric prairie
@next imp and put in in between backticks so it looks like this
code here
Im searching a lovelace for Car ? anyone know it ?
You search for an intergration or a custom-card?
Great, I'll give that a try!
Custom card for dashboard
tried searching in HACS?
I know that @hard blaze created a nice card for his car, maybe he could share the code
@next imp I converted your message into a file since it's above 15 lines :+1:
Awsomeone !
@next imp I think you overrule your state values with the style: | on the end.
Don't think you even need it, because you use custom:button-card.
@twilit dragon I converted your message into a file since it's above 15 lines :+1:
Try this
Just let me know if you need help 🙂
that was for the cards that already work for the lights etc as you can see, so it dont make a difference. I need that effect to apply to a custom button card that navigates to a subview / room.
Newbie question. how i add into HA ? i try to add your repository but hacs told me they can't
Oh lol haha
show_name: true show_icon: true style: | ha-card { background: transparent; } type: button tap_action: action: navigate navigation_path: /dashboard-dashboarden/vardagsrum icon: mdi:sofa-single-outline icon_height: 45px hold_action: action: more-info name: Vardagsrum
Does some1 know how i get the text more in the middle?
You use the default room card?
no, that is the code i use for the room card.
It is a custom template card, like the UI minimalist. There is a YouTube out there showing how to do it.
Are you editing your dashboard in the UI or yaml ?
I can do both 🙂
Alright, can't see the card type, that is left out. But I figure you could just add, for example, the light entity you used in your other card and then use the state.
nah, its in line 6. type: button.
If you look at the GitHub, there is a link to MiniHass GitHub, there is a installation guide there, I would start there, and install my card after 🙂
Oh what, alright weird for me then haha.
and that is what i've tried. but something isnt working, either im doing something wrong or it wont work because its set to 'navigate'
Not sure if you can use state with the default button-card, but you could use it with the custom:button-card
@twilit dragon I converted your message into a file since it's above 15 lines :+1:
Add the entity and change the state value to something that matches the state and you should be golden.
But as far as I know, you can't use state styling on a default button card and if it is possible, its more difficult than using the custom:button-card
Oh sorry, small fix
@twilit dragon I converted your message into a file since it's above 15 lines :+1:
Yeah now it worked! sort of XD
Sort of? 😅
#frontend-archived message
Sorry for the bump 
Just tweaked it. Now it works.
Hahaha yeah you don't need to use my border 🤣 It was a silly example. Glad it worked!
where can we get the rum ?
Not sure if there is a custom card. I would probably make it myself with the custom:button-card
@twilit dragon can you help me with the css style of my card
@jade tendon I converted your message into a file since it's above 15 lines :+1:
about the text?
@jade tendon I converted your message into a file since it's above 15 lines :+1:
Think you should use -align-self: center
Using this already, but is it even possible to do more than 2 entities? I will need like 15 😅
@lyric prairie I converted your message into a file since it's above 15 lines :+1:
does nothing, i think because of the grid area
it should be - grid-template-areas: 'i n' i think
@jade tendon see this example
yea tryed it i end up with no text
Oh wow there needs to be a space between i and n
@jade tendon I converted your message into a file since it's above 15 lines :+1:
thats what i have atm
@twilit dragon I converted your message into a file since it's above 15 lines :+1:
columns?
yea grid view
This is amazing
What if you just save it and check how it looks on the view? Sometimes the editor view won't update
And otherwise I would blame the theme you are using.
You should keep the -grid-template-areas: 'i n' between those quotes.
Won't fix it but just a reminder 🙂
Remove card styling?
You will need double and single quotes: "'i n'"
Oh yeah that is true!
Didnt noticed that
Guess that should fix it.
Great 👍
I think if you change the card-height, you could keep the icon centered if you make the img_cell the same height.
That because you deleted all the other styles with the padding and margin
added some back, the name but
made the name bit bigger
I was wrong and you should remove the height from the img_cell
Just make the icon bigger with the width.
@twilit dragon I converted your message into a file since it's above 15 lines :+1:
Ok i follow all the steps and add thing. doest i need to use a new dashboard or i can use mine to add your lovelace ? Also doesnt i need to download manually file and add it on configuration.yaml ?!
img_cell is the area around the icon, you will need to adjust the icon styles
Maybe change the icon size. But if you change the icon-size you probably want to change the card-height as wel. Or... just remove the card height.
yeah you are right 🙂
There is a dashboard.yaml file which contains the code you need to place into your dashboard to make it work, that code will then look for the card with the reference to the template folder. And use its design
change the width instead of the height
You can create as many custom_fields as you want.
Ok i add it and got this : Unable to parse YAML: YAMLException: bad indentation of a mapping entry (4:7) 1 | views: 2 | - title: Home 3 | - type: "custom:button-card" #custom ... 4 | template: -----------^ 5 | - custom_card_vehicle 6 | variables:
ah ok, thank you.
then i will need to have a deeper look into the documentation 😄
This is a really simple one, but maybe it can help you
@twilit dragon I converted your message into a file since it's above 15 lines :+1:
If you create like a sensor2 and sensor3 in the custom_fields, you get something like this:
Me personally use this
hi..
and this
thank you!
i was just reading and trying to understand the code of this examples 😄
How did you setup the toilet with motion or presence sensor? I'd like to do something similar, but I don't know now to go about it
camera 
I just have a motion sensor from IKEA on the enterance of the door.
You bet. I like to see my wife pooping.
Well, that was weird
@twilit dragon @lyric prairie You actually can add an icon to a text field by using ha-icon. Take a look at the label in this example: custom:button-card with mapped icon and icon color based on weather condition.
I use Montserrat
Thanks man! That’s exactly what I was looking for 🙂
Is there a way on a multi row entities card to only show the icon (using a custom:batery-state-entity) to display just the dynamic battery icon, and not the actual % value from the phone?
I donot have an easy answer, looked at this quite a while ago and was only able to do this via templating in the card, in the end it became unreadable code as one needs to build in 0-10%, 10-30% etc. for each (!) battery/icon (or: this is what I ended up doing), I turned to the custom:battery-state-card in the end...a list...yes
Thanks for the response, I was trying to just display the dynamic icon and couldnt find an elegant way of doing it, looks like I will be back to the design of how to cleanup and save the space to get what I need.
I could not find a way to display a dynamic icon, so used mdi: battery-10, battery-50 etc...maybe this is now possible, my attempts were form mid/end 2022
wait so your dynamic battery icon currently works right? you just want to remove the state text
If so, you can use this: https://github.com/thomasloven/lovelace-card-mod
I'm not very good with it though, would have to look through the docs
You can use it to remove the state from the card
Yes ideally, Seeing as the dynamic icon gives a rough idea of the %, I would rather just show the icon rather than the %. May also be complicating it by trying to use it in a case of a multiple-entity-row
Will check out the card mod and see if i can tweak anything to fit this usecase
Worked 🙂
Is there a prescribed method if I want to change the css on one of the default views inside of home assistant?
For example, the pages displayed at "[homeassistanturl:port]/config/devices/device/deviceID1234"
It bothers me how all of the configuration variables get smashed into a narrow pane where it becomes very difficult to read.
I haven't been able to figure out how to accomplish this with themes, and I can't use css browser injections because the entire UI is gated inside of shadow-root elements...
To be clear, I'm looking to change the device page, not make a custom dashboard that replicates the info here and then applies a different layout (which I know is possible)
I doubt that its possible
That's what I'm realizing sadly... seems like an odd limitation amongst a highly customizable application
I guess you could change some colors, but changing, for example, the width... I think you have to mess with system files which you don't want.
I don't think its really odd that they prevent users from customizing the default system pages, but I get the point that the smashing together from those entity's is not a nice sight.
Yeah, that's fair. I guess I wouldn't want to tinker with it so badly if it were actually well designed.
No shade at the devs. I know there are an infinite # of features, and considerations they need to make.
But a dynamic web ui that adapted to screens of different widths would be greatly appreciated.
Maybe in the future 😄
Out of curiousity... what's the reason behind using these shadow-root elements in the css? I'm a few years away from front end development so maybe this is a new trend I don't know about.
Because without them, I'd be able to inject css and fix this up exactly how I want to.
I read something about that they use shadow-root so they can use it also on other places. Some kind of templates.
But I'm no dev myself so I just repeat what I read haha
I know you can enter those shadow-roots with a $
I mean, I can get into them and tinker around at will after the page has loaded.
But I make only my own cards, so I don't have to mess with those luckly
Fair enough, thanks for the responses. Well if anyone else reads this and has an idea, please share!
Yeah no problem! Also curious myself if someone says it is possible 🙂
I'm looking for some room card ideas. Someone willing to share?
This is what I have now, but I don't think its that nice.
mine:
yes
but with hold_action: navigate to "room.yaml" with positibilites to change individual stuff in the rooms, also TV and such
its based on @zenith stag theme, but with some minor changes 🙂
Thought I reconized it haha!
hehe 😛
Cool cool
i can paste the code if you want to test it out
Sure!
i did not upload this to github, as its not my own card, its a rippof with changes on hehe
and from my "home.yaml"
- type: "custom:button-card" #STUE
entity: light.stue
template:
- custom_card_light
variables:
light_icon: mdi:sofa
light_name: Stue
light_label: |
[[[ return (parseFloat(states['sensor.stue_temperature'].state) - 1).toFixed(1) + "°C" ]]]
woops i deleted the wrong line hold on, need to re-paste the link
Oh I see, you reused the light card
yes
Smart
but changed the label and tweaked a bit
No, its Dutch haha!
oh Dutch! nice 🙂
I have been in The Netherlands once, in venlo 🙂
A Venlo!
This is kind of opp topic hehe sorry!
Haha it is, where you from tho?
Norway 🙂
i will do more with the the minihass light card as soon as i finish my vehicle card 🙂
The goal is to have the motion sensor and smoke detector aslo visible on the card
Yeah I would like to have some info, but not too much. I don't like the clutter hehe.
So I guess I could add a temp sensor in the left top, but thats it for me
I kind of agree, but also nice to se what windows and doors that are open... but i want a "hide" if all sensors are clear
so if everything is OK, nothing is showing.. but as soon as a alarm goes off, or a window is open it will be visible on the card
Could be a great option
yo that's really cool can you share the code for that? I don't need it for a climate device but would be nice to know how to add buttons like that, I have a few things i wanted to do that it would be useful for
yep, thank you so much!
No problem!
Hé everyone, I was wondering, if you had to choose a theme, would you choose a team with one base color and the rest black and white (or constrast from that) or would you choose a theme with multiple colors. Of course in both cases it will match perfectly.
@twilit dragon I decided that I like too many themes and enjoy random variation, so I ended up with multiple themes and a random theme selector that changes based on time as well as the wallpapers changing...I get bored easily and this helps immensely LOL 😛
here: https://github.com/Dino-Tech/Home-Assistant-Main/blob/master/automations.yaml#L372-L508
Haha great tip!
Does anybody know if it is possible to select the number of hours to show for the forecast card?
Right now it is only showing 5 hours. I would like to see at least 12 hours so I know how the day or night is going to be 🙂
P.S.: Probably using some kind of card_mod or other mod as the docs do not indicate a stock option to do this.
Probably best bet just finding another weather card.
Or if your forecast supports it there is twice_daily forecast, which will show you the nighttime low (but not hourly)
can are you share code of this
Yes I did, but on a previous version of HA on a different system.
does anyone know of a photo slide show card , preferably that can link to a google album? but local media is fine too.
Could you post a picture of the state like I did?
i was just drafted in the military and haven't been taking a look at HA for a while, and i see my minimalist cards have been destroyed. how do i fix them?
Depends on what you mean with “destroyed” and what kind of cards you mean.
If you mean the UI minimalist cards, I would just download the templates again so there are up to date.
tried that but it didn't work
so i thought HA might've changed something in the yaml
idk. i haven't touched yaml for two months so i kinda suck at it
Also make sure that everything is up-to-date from HA, to intergrations and HACS
Can you show a screenshot and a example with code?
Nah just some card that doesn’t work anymore.
i'll try
Because the error looks like something is wrong with the templating so that could be out of date.
oh the custom card hasn't even been updated
So you found the issue?
since it happened after one of the updates, i believe it's got to do with some changes of the HA's coding structure. i don't really know. But I noticed Miniamlist website is under construction so they might fix it soon.,
thanks anyway
Website looks fine to me tho
