#frontend-archived
1 messages ยท Page 23 of 1
its a native attribute in the mobile_app, on the geocoded_location entity
Just an idea - If you make a list of time differences (if, then, else stuff) you might be able to add that to the utcnow time
Or the date_time_utc sensor
yeah, but even if I had the datetime (template) how to show it in the dashboard? There's no card using that, other than the entities card? All cards I found were using hard coded TimeZones
A template sensor for that calculation for each person would be my idea. With that you could use it in entities cards, button card, markdown,... If I got you right
yeah, thats really a very tough way to get something so seemingly simple as a clock in your dash... if we could get those templates easily, which isnt the case based on the Time Zone (requires an external library).
Pieter's older post is what I did look at https://community.home-assistant.io/t/lovelace-button-card/65981/5106?u=mariusthvdb and can be update to use a dynamic TimeZone (probably). its a heck of a complex way for a (seemingly) simple requirement..
and doing it all in Javascript for now, needs some extra formatting, but it gets the thing done:https://community.home-assistant.io/t/lovelace-button-card/65981/6962?u=mariusthvdb
Is there a way to set a different default view for different devices?
i.e I want to see my phone's battery level on my computer's interface, but I don't need it on my phone
You can set the default dashboard in your user settings on your device. That setting applies to that specific device, not the whole account.
Thanks!!
hey, is there a way to link to an anchor on a page (lovelace/kitchen#lights for example)?
well... looking at the HTML, I see a LOT of shadow roots...
Hi, when I click on a card to see the history statistics, it shows dates from 2024 to 2114, any idea what could be the reason? I tried to restart to no avail.
If I got it right, normally it should be only the last 24h when you click for more info
All I can think of is make sure your clocks are correct in both client and server. Maybe check what custom resources you have installed, if any (make sure they're updated, or try disabling).
I haven't seen that issue pop up before.
Maybe something corrupted in your SQL database, like it has an invalid timestamp.
This is for all entities? Or just one?
fixed it myself, if anyone's interested https://shadowaya.github.io/home-assistant/#anchor
hello.
can i change the number to different text but still send the number by mqtt ??
Yes, that would need to be a template set up in your MQTT discovery info
can you please point me in the right direction ??
what are you currently using for your select entity?
input_select.nibe_water_lux
@tacit cave ? maybe i did it the wrong way
problem is i dont understand how to fix 4 payloads
Does anyone have any issues with 'Custom element doesn't exist' errors? I seem to have that going on with a couple cards but found a strange workaround. I get that error whenever I refresh or log into HA. If I open the Dashboard Menu -> Edit Dashboard -> Add Card -> Cancel, the error goes away and I see the cards until I refresh or log into HA again. Not sure what's going on here
I've got some Hue lights and when turned on, I've got it to show the drag bar for brightness...
However, at day, I'll power off those lights to save on electricity and the bar disappears and shows as unavailable. What yaml code can I use to hide the bars when they're unavailable?
I've used the below code
hide_if:
conditions:
- condition: equals
value: 'unavailable'
but that doesn't seem tod o the job
Those are usual entities cards and you want to hide them when unavailable?
When you go to the entity details of that card and change to yaml mode, there is somethink like
entity: light.bed_lightstrip
correct?
Please don't share code as picture
Sorry
To format your text as code, enter three backticks on the first line, press Shift+Enter for a new line, paste your code, press Enter again for another new line, and lastly three more backticks.
```yaml
example: here
```
Don't forget you can edit your post rather than repeatedly posting the same thing.
cards:
- type: entities
style: |
ha-card {
border: none;
}
entities:
- type: custom:slider-entity-row
entity: light.lightstrip_jasonsroom_bed
name: Bed Lightstrip
- type: custom:slider-entity-row
entity: light.bulb_jasonsroom_desklamp
name: Desk Lamp
like this?
Not 100% sure, if that works with those custom slider cards, but you could try this:
https://dpaste.org/K4ZOj
that looks to have done the job but takes quite a bit of time for them to disappear though
thanks for that code ๐
You don't (yet).
What am I doing wrong here? When I enter min/max the needle doesn't show the correct position
oh it was a bug.. when I actually added it to the dashboard, the needle went to the correct position
The UI is modernized release by release. The most modern one is the tile card.
It might come.
๐ฎ
that would be crazy lol
damn!
I have to say the last 2 or 3 releases have been gorgeous. the interface is getting a major overhall and I love where it's going!
Nvm, my message quite literally was the last thing discussed here
Isn't the slider for cover-position what you're looing for? or is this slider not yet available since I can't get "cover-position" to work
It is not available yet
Is there an undocumented setting for multiline word wrapping/hyphenation in tile cards?
- type: tile
entity: climate.bedroom
features:
- type: "climate-hvac-modes"
hvac_modes:
- heat
- cool``` is not working on the latest release
Do you have 2023.9?
Is it a secret?
Still cant get my sidebar to show up again when casting to a google home
I dont have kiosk mode installed
I'm using the Tile card for my Ring Alarm. The selected modes show correctly on the dashboard, but for some reason, all of the modes still show on the more-info dialog. Anyone else seeing this issue?
Dashboard card modes are customizable, more-info is not. More-info shows everything that your alarm claims to support.
The toggles in the card only affect how that particular card shows on the dashboard and nothing else.
If you really don't want it to be there, you can override supported_features flags with customize.
zamn the new thermostat UI looks amazing, is there any way to just embed the new entity view into the dashboard as a replacement for the thermostat card?
I had the same thought
Iโm new to HA Iโm using tabbed-card.
Is there a way to have the icon / status instead of label ?
Any known bugs to lovelace in 2023.9.0 ? If i refresh lovelace it doesn't seem to populate values from history and waits until next update before showing a value.
Doesn't seem to affect all values. Mostly MQTT. Just switching view/tab works but if I do a proper browser refresh this effect happens.
Is there any way to change a lovelace view background based on an entity value? Eg. sensor == on then set background image 1
after 2023.9.0 this card won't work until i go to lovelace then edit and then done.
and refresh
idk might work
no colour options in wled tile card
Yes looks like this one: https://github.com/home-assistant/frontend/issues/17846
I think I see the reason.
Thanks for the info =) I'll await fix.
Hi,
Some UI-Pages are extremly slow since the latest update, whats the best method for analyzing/debugging that?
Homeassinstant running in a vm (unraid) 2vcores(~4.1ghz) 4G RAM (or should i add more? (ive got around 50 devices, 3 webrtc streams and around 30 zigbee-sensors)
if i click on my dashboard the site takes around 2sec to load.
And switching between dashboard takes even longer
cannot see a abnormal cpu usage
I don't think your HA server's cpu performance would affect that (unless you've got a lot of templates or something)
okay, so it might be a overloaded dashboard?
I can't really say. Mine still feels about the same quickness.
As for how to debug, I would just try and isolate and see if there's any particular element that seems to be causing it. If you just make two of the most basic dashboards possible (single entity card?) and switch between them, is that also really slow?
I thought I feel like I remember seeing one or two comments recently that frontend seemed to be "slow" (maybe it was in the beta channel?), but I don't remember exactly.
so they did managed to break something in 2023.9.0 after all
Tabbed Card in particular ๐
that's what I get for not having time for beta testing
edit: found problem! <mwc-tab-bar> and <mwc-tab> custom elements, that Tabbed Card depends on, are no longer loaded by frontend by default.
Workaround is to call loadCardHelpers().then(ch => ch.importMoreInfoControl('weather')) js code somewhere to force them to be loaded.
thanks, so it might only be on my instance, this helped me thanks
hmm the problem was the apexcharts-card
I created a view, based on a panel, that I think I PEBKAC'd and now that view doesn't load/select. I can't delete it since I can't select it... How can I go and remove it? I assume yaml/config edit?
Under
there's "Raw Configuration Editor" which has the yaml for all your views.
Thanks, it's gone!
hey, i love the new more info card for the thermostat. does anyone know why the thermostat entity for dashboards wasnt also updated?
Capacity of frontend developers
@tacit cave ypu have time to help me ??
Hi, thanks for trying to help! I run HA directly on an Odroid, not on a server, so I tested with {{ now() }}, {{ now().astimezone() }}, {{ utcnow().astimezone() }}, {{ now().now() }} in developper tools and the time looks right. Same in the UI settings. I only have two custom resources: mini graph cards and weather card, but I have the bug on almost entities, even just a "Sensor" card, which should work without these resources. One card doesn't have the bug, and it has the same settings as others
Is there maybe a way to check for corruption on the SQL database, or maybe just restart the data recording fresh without losing the setup / frontend? I don't really care about past history
if you just delete the .db it will create a fresh new clean one
or you can move it to a different filename if you want to preserve it but just test a new clean one
Thanks, will backup, change name and report back
I have an image file(jpg) that resides in my www folder. I update this file every two hours. When I look at the picture entity that references this image file, it appears to always be cached with a previous version of the file. I have tried safari, firefox, chrome, and they all show the cached file. I've used the trick that was mentioned on reddit to use a querystring parameter at the end of the file name, but that only updates to the new file when Im editing the picture entity on my dashboard. Someone also mentioned to use a generic camera entity, but that doesnt work either. Any thoughts?
lightning bolt icons, why do they appear
I'm trying to use the custom button card to change the background color of that card based on an entity attribute value. so far everything i've tried fails, either at the attribute name or doesn't return the attribute value. I can post code if needed but any suggestions that I can try?
please share the code for the card
Please use a code share site to share code or logs, for example:
- https://dpaste.org/ (select YAML for the language, and consider picking a longer expiry)
- http://pastie.org/ (select YAML for the language)
- https://paste.debian.net/ (you guessed it, select YAML as the language)
Please don't use Pastebin, since it can randomly add spaces to the main view. Please also don't share text as images since it makes it harder for people to help you. Remember that others may have colour blindness, impaired vision, etc.
don't just paste in the channel
I had a feeling you would be the one to reply lol
This is my most recent attempt despite just saying 'attempt 1'
https://dpaste.org/CWGaU
does the label come through as expected?
nope, it shows nothing. It has a value of 0 though
so it should show something...
I also tried this "(states['sensor.ercot_notices'].attributes.Non-Spin_deploy" and when I use that set ( can paste full code if needed) but it tells me that the attribute doesn't exist, but it does.
yes, that's a weird attribute name
There are two attributes, a deploy and a recall
I'm more familiar with Jinja and Python, so I always have to look up Javascript syntax
Ya, if this was that way then I would be good.
and I stopped using custom button card a while back and don't have my old dashboard handy
Is there an alternative better used ?
I switched over to the Mushroom template card, which uses Jinja templates, but it's not as capable as custom button card
in any case, there's nothing complicated in what you're trying to od
ya, I didn't think there was ... I mean I can get there, but not with this one haha.
can you share exactly what attributes that entity has?
sure, i'll add the current set to the paste
I do note that you're either assigning a string ('none', which I guess is a string in JS) or some integer to status?
and not providing an "else" clause. so the logic looks weird
but all that doesn't explain the label not working
That's in one part. I removed that for the label. I wanted to get that label value to show then i'd know I had the right code.
Paste updated
I'm not in love with CBC, if Mushroom will do what I want... I used CBC in other areas for the icon animation and whatnot. When it's not working with attributes I have no problems with it.
I don't see an udpate
https://dpaste.org/v00xk/slim --- at the bottom
oh nice. "edit" doesn't reuse ... sigh.
yeah
I suggest removing the style until you get the label working. It could break the whole thing
originally it was the other way around ... I won't actually use the label in the end. more of a cheap debugging tactic lol
Does Mushroom template allow for animation like CBC does ?
I don't recall. I don't use it
... Do you not use Mushroom template card anymore either?
no, I mean that I don't use animations
I stuck exactly this code into my dashboard with one of my entities and it works fine:
type: custom:button-card
entity: alarm_control_panel.aarlo_base_station
show_name: false
icon: mdi:power-standby
#label: Non-Spin
show_icon: false
show_label: true
label: '[[[ return entity.attributes["brand"]; ]]]'
so, I suggest getting rid of the styles: block and testing with the friendly_name attribute to set a baseline
I hate case sensitive crap sometimes. Turns out that's what it was. even though I have tried doing a copy paste to check that several times.
CBC is definitely on the bubble lol. Mushroom can still do the animations. so. JS is not my preference.
Mushroom template cards recently had a breaking change to animations. Most of the older examples don't work but can be adapted to the newer syntax. https://community.home-assistant.io/t/mushroom-cards-build-a-beautiful-dashboard-easily/388590/7231?u=d_sellers1
name: '[[[ return entity.attributes.brightness]]]' also works with custom:button-cards
Thanks for the headsup @tribal galleon ... I will keep it mentally noted.
ya, i'm working now, so i'm calling it a win and moving over to Starfield until tomorrow when my brain is fresh. Between doing this for hours and listening to a work call ....
Is it possible to hide certain entities without a unique id in lovelace? I've added 3 entities from the configuration.yaml, 2 which are being used by the other one (climate). I only want the climate one to be visible, is there a way to hide the others?
Just give them all unique IDs
Looking for guidance on building a stacked bar or line chart to illustrate duration sums by day of a sensor that has many values. Itโs a template sensor for ecobee thermostat reading the hvac_action (cooling, fan, heating, idle). I want to see how much each is running daily over 7,14,21 days. Apex chart or something native? Any help on where to start.
How would I do that? They're not from mqtt or template integration, from what I read in the docs only those could be given a unique id
If you created the entities within configuration.yaml, you just need to add unique_id: UUID_HERE. IIRC, you can set it to whatever you want. But if you want some UUIDs generated for you, check this out: https://www.uuidgenerator.net/
Here's an example of one of my template sensors with a unique ID. ```yaml
- platform: template
sensors:
dashboard_date:
unique_id: 2853690a-0b7f-4b64-876d-bcec8493cd61
friendly_name: ddd m-d
value_template: "{{ now().timestamp() | timestamp_custom('%a %-m-%-d') }}"
icon_template: mdi:calendar```
I did create them from within configuration.yaml, but the problem is that they're not from the template platform. They're from command_line and a It's a light entity from a custom platform.
Youd need to look at the docs from that custom platform
Anyone have the issue with the new release where you are starting to type to search for an entity and see the results but if you pause too long (a few seconds) looking for what you want, the list refreshes and your search results go away and have to backspace and type a letter over to trigger the results again but then it repeats and I never have time to pick the entity I am looking for. This is on the card configuration when searching for the entity you want to show and on the HA app on the iPhone.
Don't believe any issue like that has been filed. I checked in one card but I don't see the problem that you do. You might be more specific about exactly which dialog you see this in, possibly want to report an issue.
Here is example (assuming it will attach video).
I just tried a different card and it appears to be related to the entity field in the Vertical stack card
I was not aware vertical stack card had an entity field... are you referring to some custom card?
I see. I am using vertical stack but it is the cards inside the stack being edited. It is related to a new card I was using so I will report it there (bubble card).
It worked by deleting the db, thanks again!
i thought that the icon for entities would change based on its state? do i need to do something in particular to make this happen?
i want to use the "mdi:alarm-light" for this
Some devices do change their icons, like fans for example. When the default icons are changed in UI, it doesn't work anymore.
If you want something special, for some template entities an icon template can be defined
To add to what Jorg said, some cards allow you to define state parameters, like the custom:button-card https://github.com/custom-cards/button-card#with-operator-on-state.
Card mod is another option for templating some of the stock cards that generally do not allow much customization. (Can be used on all cards but useful for on stock cards.) Here's an example using an entities card: yaml card_mod: style: |- :host { {% if is_state('light.hallway', 'off') %} --card-mod-icon: mdi:light-switch-off; --card-mod-icon-color: red; {% else %} --card-mod-icon: mdi:light-switch; --card-mod-icon-color: green; {% endif %} }
Is there any way to control the order of some Frontend Integrations/Hacs js / css loading.
I use a mini-graph-card and banner-card. The order of loading of the javascript files seems to affect the css and in turn the dashboard style. Ideally I would like to lock down the order of loading. Currently if I F5 / refresh my dashboard, i can see in the chrome dev console, the load order of the js files is random between the two (they seem to have their own log messager to the dev console, that shows in random order each time), so the css order is in turn random, and both have different styles for some major elements on my particular dashboard.
eg sometimes in the js console I see.
MINI-GRAPH-CARD 0.11.0
banner-card: 0.13.2
and the dashboard looks good.
Other times, I'll see
banner-card: 0.13.2
MINI-GRAPH-CARD 0.11.0
and some of the styles look really bad/way off what looks normal, overly large fonts etc.
Is there a way to add HA dashboards to a phone's home screen?
Other than using the phone apps?
Yes - would love to have access to dashboard without having to open app first
iOS lets you create a Home Screen icon for any URL, so sure
Android ๐คท
Not really a #frontend-archived question
Ok. I wasn't thinking straight.
@tribal galleon Hey Derek, have you ever tried this animation, but for the off state grey out with no animation? Just wondering if you may have one in your plethora of yaml examples ๐ค ...if not I'll have something to do over the weekend ๐ I've been working out of town and on mobile a lot and it just bugs me when everything is off and it still flashes
- type: custom:mushroom-entity-card
entity: group.lights
icon: mdi:lightbulb-on
card_mod:
style: |
ha-state-icon {
animation: illumination 2s infinite;
}
@keyframes illumination {
0%, 100% { clip-path: inset(0 0 0 0); }
80% { clip-path: polygon(0% 99%, 20% 55%, 22% 37%, 39% 20%, 61% 21%, 77% 35%, 79% 57%, 99% 100%); }
}
d sellers1 Hey Derek have you ever
I am using custom:auto-entities, and I'm struggling to filter out some entries. Is there any way to dump matched objects as JSON or something I could look through?
Specifically, I'm trying to filter exclude things like this:
When using a group to control multiple climate entities, it doesn't work great with the new dialog.
https://imgur.com/a/7hwfVZ5
When I push the +/- buttons, nothing happens. When using the wheel, it works, but it glitches graphically.
None of this appears on the ordinary climate control when you only control one entity at a time.
Where should I create the issue, in https://github.com/home-assistant/core/issues?q=is%3Aissue+is%3Aopen+label%3A"integration%3A+climate" or in https://github.com/home-assistant/frontend/issues?
Try controlling the group with a service call like in devtools (the frontend UI elements just use service calls to relay your requested changes).
If you try to use group service call and it's not working, than maybe that's a core bug, but if all the service calls work correctly, than it may be frontend bug.
Is there a card that can periodically poll and grab a jpg from a website? I'm trying to get my Blue Iris cameras up on Home Assistant, but the current system that I'm using (MJPEG camera) is putting too much strain on my Blue Iris CPU. I have a URL where I can pull a recent jpg from my Blue Iris cameras, so I just need something in the Home Assistant front end that I can set up to pull an image every 5 seconds (instead of the current live stream).
That's a usecase for trigger based template images.
Anyone knows how to show the bottom one like the top one.
Bottom ones uses 1 entity but top can't use it
Top code:
type: custom:mini-graph-card
entities:
- entity: sensor.kamer_jurre_inside_temperature
Bottom:
type: history-graph
entities:
- entity: climate.kamer_jurre
Climate is a bit of an odd case since it is not strictly a sensor, but the history graph has special code to pull the relevant bits out of the attributes and graph them.
If your mini-graph-card doesn't do that, you would have to create template sensors of each climate attribute you want to graph, and then add those sensors to mini-graph (or maybe it can graph attributes directly)
And how can i do this?
This is a working example of mine with a confirmation to toggle on the lights.
type: custom:big-slider-card
entity: light.master_bath_main_lights
tap_action:
action: call-service
confirmation:
text: Toggle Power
service: light.toggle
service_data:
entity_id: light.master_bath_main_lights
data: {}
hey, so it looks like after the 9.0 update, im getting this weird behavior with the more-info dialog. it looks like hovering over a point near the bottom of the more info pop-up is causing causing the box with the data to overflow. i dont remember this happening before. i didnt see any issues on github about this, but I may not have searched the right thing, so I was wondering if this was known or not, and i can submit an issue
Do you have 9.1? This PR might have fixed it, I'm not certain: https://github.com/home-assistant/frontend/pull/17848
ah, i do not yet, i assume that'll fix it, if not, i'll create an issue of it still happens afteri update
Any way I can make Lovelace tile cards thinner?
I want to make a status card thin, so I can out it right under attached to another card.
So it needs to be positioned as well so it is touching right under another card.
That looks a lot cleaner, but you can also enact significant screwing about with card-mod (https://github.com/thomasloven/lovelace-card-mod).
I'm doing this to squish things down (has to be added to each card, I'm using room-card with a bunch of things inside for each room on the dashboard):
ha-card {
border: none;
padding-top: 0;
padding-bottom: 0;
}```
Does anyone know if its possible to force the Tile-card to use features not supported for specific entities? Im using alot of number-helpers in my installation, i would love to display them as tiles with either slider or -/+ buttons
Hi, I've written a conditional automation that opens or closes my awning/cover based on several meteorological variables. The automation has two states, 0 or 1. I'd like a card that shows me the current state. If I e.g. use a button card, it just always says 'on' even though state is 0. How can I tell the card to show status is open in state 0 and closed in state 1?
Automatons are on if you want the trigger enabled and off if you don't. They don't have a 0 or 1 state
Rather then focusing on the state of the automation, which has no use here, you should focus on the state of the awning
Which is a zigbee "light" controlling it via brightness, so the current brightness should tell me the state... Gotcha. Thanks!
can i display android tv screen in homeassistant ?
To add to what @cosmic remnant and @small loom said about stack-in-card and card_mod, some cards can actually contain other cards. Here's an example with a custom:button-card https://github.com/custom-cards/button-card with an entities card on the left (card_modded to only show the toggle) . It also has a custom field for a "simulated" toggle switch on the right.
But you mentioned wanting to make a status card. Here's one using a custom:button-card with custom fields for the information to be shown. It is just a matter of getting the layout to work right. (This example is 144 lines long.)
You might get some better results with the custom:button-card than trying to get a handful of cards to play nicely with each other. The Markdown card is also very useful once you can start getting the information to show in it the way you want.
Hi All, Apologies if this has been asked before, Nothing i find online seems to actually work for me.
All im trying to do is have it so the dashboard fills the full width of the screen.
Unfortantely, its just 3 columns and i cant find a way to make more? say 4 or 5 columns.. it always snaps to 3 and has huge amounts of wasted space each side?
what am i doing wrong?
You'll want to change your view type from Masonry to a different layout. Personally, I use Panel (1 card) with various layout-type cards as needed. For example. you can start with a layout card and set it to 4/5 columns and then build the dashboard within those columns. Here's a quick example for two columns that I use yaml type: custom:layout-card layout_type: grid layout: grid-template-columns: 50% 50%
Thanks, ill take a look. โ๏ธ
That YAML you have , where is that placed / configured?
Cheers G
@hallow elk When you set the view to dashboard, you'll have a single Edit button in the bottom left corner. Then, in the bottom left corner of the window that appears, you'll see Show Code Editor. This is where you'll see all the YAML for that view. The code posted above is literally the first couple of lines. Cards contained within that layout card are defined under cards: (with appropriate YAML spacing and a hyphen to start the next card) which can contain other layout cards.
Ahhh gotcha, thanks!
If you collapse your sidebar I think you get 4 columns in masonry layout, otherwise 3 is the max. But if you want more, you'll need a different type.
Hey, I'm having trouble setting up the statistics graph card. It just says "No statistics found."
Is that a new statistic?
Is this because the entity doesn't have a unique ID?
yes I just set up a sensor in yaml
I think that's fine, it's just saying there's no data (yet).
Does the 5-minute period work?
Since it's set to day, my guess is you have to wait at least tomorrow for the graph to start appearing.
I'm not sure how to check that
Ok, for one thing, your sensor should have a unit_of_measurement, which it currently doesn't.
that's why it's showing up as a bar chart, instead of a line chart in history.
I intentionally didn't set a unit_of_measurement value in yaml
hang on
mi_scale_2_weight:
friendly_name: "Mi Scale 2 Weight"
value_template: >-
{% if is_state('sensor.mi_body_composition_scale_7af7_mass', 'unknown') %}
unknown
{% elif float(states('sensor.mi_body_composition_scale_7af7_mass')) < 50 %}
{{"Faulty Value"}}
{% elif float(states('sensor.mi_body_composition_scale_7af7_mass')) > 50 %}
{{float(states('sensor.mi_body_composition_scale_7af7_mass'))}}
{% else %}
unknown
{% endif %}
this is the template
I wanted to have a "Faulty Value" value intentionally
ok, let me think a moment
I didn't know if setting a unit_of_measurement value would break it
go to developer-tools/statistics and look up that entity, what do you see?
does it appear there, and does it say "No issue"?
I'm thinking sensors must have a unit to be valid for statistics
otherwise it justs treating your values as random strings and not numbers
let me try that quickly
I would suggest instead of trying to hack in "faulty value" as a value of the sensor, to use an availability_template instead, so that your sensor is always either a number, or unavailable.
The last time it was suggested for something else I couldn't figure out the syntax entirely
But I think I should do it that way and add unit_of_measurement value as well
you may also need state_class: measurement as part of the template
I have set the temperature sensor accuracy to one decimal, but for some reason the mushroom-chips-card still shows the result with two decimals. Doesnโt it use the accuracy that has been given to the entity? I don't want to make a template sensors for just to adjust the accuracy to one decimal, if not necessary.
@dreamy roost I converted your message into a file since it's above 15 lines :+1:
I've done this but now it doesn't allow me to restart
I would suggest to open an issue in that card's github
what does it say?
not sure... are you using modern or legacy template format?
I believe device_class is only support on modern format, not sure if that's your issue though.
you must be using the legacy format, you might have to change to the new one
yeah this is somewhat confusing:
https://www.home-assistant.io/integrations/template/#legacy-sensor-configuration-format
should I be using the modern one?
if you want to have a state_class/device_class you need to use modern format
sensor:
- platform: template
is the old format
modern is :
template:
- sensor:
- name: "mi_scale_2_weight"
state_class: measurement
...
oh interesting, yes seems like I'm using the legacy format
that's why some of my copy-paste templates didn't work at all
yeah unfortunately it won't die because too many old guides are documenting it ๐คฃ
so there's this eternal confusion
oh yeah fix would be an enormous job
side note: the thing is still missing in the statisctics tab
you don't have to do everything, just this one template
it needs modern to have a state_class, and it won't make a statistic without a state_class
you can mix and match new and legacy though
oh can I? perfect
let me give it a shot
so availability_template should be availability now
and value_template is gone? how do I set the value then?
Thank you so much, these was all extremely confusing before you explained it
Some docs talking about state, some docs talking about value_template
I couldn't get most of the things done I wanted to do :P
Bingo, now I'm able to see the entity in the statistics tab
great, glad it's working out.
now it's what you've told before
I set it to 5 minutes just to check, and the card displays the statistics now
sounds like it's working then
yes, you're awesome, thanks again!
and I've learned setting up the availability as well, which is a big plus
This is what I want to change but I donโt have a lot of technical knowhow as to how I should do it.
I want the state of the device to be shown on top while on the bottom a thin line shows the state of its battery.
So the blue line in the image should be attached or right under the words โMotion Detector 2 Motionโ as if it is a part of it.
Or something like a โSlider button cardโ but instead of sliding myself the slider shows the state of another entity while the button on it works for anotherโฆ
i'm far from an expert, my frontend is pretty lame
I spent way to much time manually configuring my entity row card, lol
It'd be pretty nice if the tile card for thermostat would show the current temperature like the climate card does
Would be a nice replacement for a pretty clunky climate card
you realize he said Tile card right? yours is entities card
Some cards allow a second row for extra information, such as the custom:button-card https://github.com/custom-cards/button-card and Mushroom cards https://github.com/piitaya/lovelace-mushroom. There's even a card that adds a second row to the entities card: https://github.com/benct/lovelace-multiple-entity-row.
The battery bar might be a little more complicated but probably still doable. I haven't used it but the bar-card might be an option. https://github.com/custom-cards/bar-card
I think most people just utilize some sort of color change to display battery levels.
If you look at the image I out, it is in a second row; but I donโt want the second entity within a second row I want it within the same entity card that the button is in. So basically a button and status card in one.
2 in one type of thing.
For my motion detectors, I simply added a colored dot to the card to indicate the battery level.
Is that a second row or a second card being shown?
Color dot wonโt show the percentage; also, the one in my image was showing time countdown another thing I would like to add to the motion detection card.
True. The dot doesn't show percentage; it is just an indicator. Green for good, yellow for starting to get low, red should be changed. Percentages aren't hard to add:
So can you make the battery icon clickable and the percentage of another entity?
That way we can also add battery levels and time left if it triggers an automation.
And for motion detection it would change the icon to a detected icon.
Sure. Icon state changes are generally easiest, sometimes requiring card mod. The motion detector cards above are subdued when clear; flash red when detected. Getting the battery info can be used from a different entity; it just depends on the card that you're wanting to use and its capabilities.
The countdown timer may not work as planned because I don't thing the UI updates in realtime. You may see something close to realtime but I don't think actual seconds counting down is feasible. A fix for that would be to get it to say something like "Less than a minute".
The regular entities card shows the actual live seconds countdown for a timer, though that's special behavior coded in the client, it doesn't come from templates or the backend.
I just tried an active timer in an entities card. Works just as you described. That could be useful. Perhaps it would be possible to hide the icon and name and set the width to retain just the countdown. Perhaps a conditional that hides when the state is idle.
Well, that was easy enough... (Timer triggered from another window.)
Hi, in the dashboard I use an addon to automatically refresh the dashboard. Unfortunately, it often happens that after such a refresh not all elements of the dashboard are loaded, but always the same 2. The dashboard is displayed on the tablet in the FullyKips App. How can I diagnose this?
Are you having issues when restarting, for example? The Fully Kiosk Browser integration has a button for Load start URL for each device. I set an automation to button press the entity for two tablets 3 seconds after starting. ```yaml
- service: button.press
data: {}
target:
entity_id:
- button.fire_computer_desk_load_start_url
- button.fire_living_room_load_start_url```
My issue isn't related with restarts or reloads
I have another automation set when HA is shutdown, it has the tablets browse to a different page. This way, I don't see HA starting and the dashboard being all wonky. (Note: this is being hosted on an NGNIX server on my Unraid box; having it on HA's webserver was unreliable as HA would restart quicker than FKB could browse.)
What are the two elements that are acting up? This happens whenever you refresh the dashboard? Does it do it when you refresh the tablet locally?
I dont refresh tablet manual, so i dont know. This elements what i mark:
Now my tablet is after auto reload, and i have full dashboard. But before i have empty page with only this 2 elements in begining od the page.
to manual "referesh" and see whole dashboard, i click on other dashboard (for example Energy), and go back to my dashboard
additional, i thins that is related with position, becaouse today i make changes, and in previous dashboard version i havent this buttons, but simple entries. And when i have "broken" dashboard on tables, i see elemnets from this same positions what i mark on screenshot, but energy has been on center, and entites on left
I've seen some people have issues with the energy card but I don't use it so I don't have any experience with it. What are you using for the fan control? It doesn't look like anything fancy or crazy that would cause issues.
This is esphome to modbus
but you have right, i see this issue after add fan control...
In the previous version, I had an entity with a slider instead of fan control.
finally got around to hacking together some functional badges without using anything third party
btw anyone know if i can set the system default favorite color temperatures?
or where they're stored so i can easily change them for all of my lights in a text editor?
Silly question maybe, but I can't seem to find a clear answer...
- I have the default dashboard with everything on it.
- I created a new dashboard which seemed to automatically contain everything the default dashboard did.
- On the newly created dashboard, I am moving cards(?) into other tabs, to make it easy to quickly find entities for a specific room/area.
- There are some other things that were replicated from the default dashboard that I don't need on my new tabbed dashboard.
Is it safe to delete those cards(?) from the new dashboard, or will it delete them from the default dashboard as well?
can I duplicate a dashboard view somehow?
nvm, just figured out where to edit the full yaml.
I recently bought some sonoff s31 with power monitoring capability. I flashed if with tasmota. I added an 'entities' card which controls the button etc... I didn't immediately see any power readings. What are some of my choices for monitoring power consumption?
Dashboards are independent of each other. What you do in one, won't affect the other. You can even remove the auto-generated dashboard and if you want it back, HA will recreate it. I keep it around just to be able to see every single entity sometimes but I rarely use it.
Yeah I definitely want to keep it around. I was just cautious because I moved a device between areas and it refectlect correctly on ALL dashboards, so I was concerned with deleting a card from one would also delete it from another, but if that's not the case I will go ahead! Thank you for answering my question for me!
Sounds like you're just venturing into the frontend. There's a lot of possibilities, and, generally, you can do just about anything you want. It may be a matter of venturing into custom cards, using card mod, using templates, or learning a bit of Jinja/Javascript/CSS.
FWIW after flashing I applied the template shown here; https://templates.blakadder.com/sonoff_S31.html
Yup! Been using HA for a few years but never gotten around to customising the front end until now (other than organising devices into rooms/areas).
But now got someone living with me that would benefit from having a much more simplified UI, so that smart home/automation stuff isn't as daunting.
I guess that's a real old template. I flashed with version 13.1.0 which has a config for the S31 selecting that instead of the template I now have the desire powered entities.
Still searching for some best practices for card selection...
So how do I make what I am trying to make?
Can you walk me down step by step?
There is a gage meter that shows live countdown; so it should also work for a bar state change as well.
It's probably not something I would be able to talk you through step-by-step. You're talking about customizing a bunch of stuff and getting them to mesh all into one for a very specific use case. A lot of the stuff that I use, I've pieced together from other examples found in here, in the forum, or on Reddit. As I learn something new, I incorporate them into my own designs. Some of my buttons have gone through several revisions (and I still have some other plans that I need to incorporate.)
For example, these buttons have gone through so many changes that I don't even remember what they used to original look like/do. Like templating the cards and incorporating variables, the brightness selectors lighting up, the color temp, time on, and Automatic custom fields. And, now that I know how to make a timer actually countdown on the screen, I want to put that on the button.
My suggestion: start small and work towards the end goal. There's a bunch to learn to allow you to get what you want done. Lastly, what works for me, might not work for you (in terms of design and layout and whatnot.)
Anyway you can make what I am trying to do then share the code here so I can change the entities on it and have it work?
It would probably take me many hours to try to figure out what would be needed to be done to get the design that you want and, in all reality, I'm not all that good with designing stuff from scratch.
For example, when motion gets detected as it is show in my image it would say detected and the icon would show it too; but it triggers another entity to start a timer, which would be the blue line right under attached as if it is a single card.
Another would be a button to push, but at the same time have a blue line under it showing the battery life of that button but with another entity.
As the line shrinks it shows how much energy there is left.
But now, you're talking two different things: frontend and automation...
See if the custom slider can be modified to show the status; because it already has a button on it and a background that changes based on state.
And I can tell you, I don't do automations like probably most of the guys around here. I prefer to use Node-RED which is a whole different aspect of things.
No automation; it just triggers a timer to start and takes the entity name of the timer to show its state.
I use node red too
That's automation.
This one show my motion detector counting down so it can detect motion again.
I used node red automation for it but I think there is an easy way to make a demo without automation. Just by using the helpers.
If it is possible, I don't know how to do it. It doesn't fit into anything that I have experience with.
DM me, letโs figure it out
rubs chin
is there a way to have tap action and double tap action control two different entitites?
You can do whatever you want in the action to whatever entity you want
show_name: true
show_icon: true
type: button
tap_action:
action: toggle
confirmation: true
entity: light.xxx
double_tap_action:
action: call-service
service: light.turn_off
entity: light.xxx2
Where am I going wrong
You have to explicitly call the toggle service
Yes, but you probably need to specify data: or service_data:
And you can't just add entity: there. You have to call a service
I think i got it
hold_action:
action: call-service
service: light.turn_off
target:
entity_id: light.brj
data: {}
needed target:
and specify that under the call-service
Yes
Does someone know if it's possible to disable the visibility of the current state within the tiles? For example for this automation. It's just an automation so there is no state
Of course Netflix & Chill is a state 
The state is, if the automation is en- or disabled
Ok, you're right. But I don't want it to have state on the dashboard
The stock tile card does not have a feature to disable showing the state. The button card does.
Yeah that's what I recognized a few minutes ago. But on the button card the circle in the background is missing
so it's not consistent look
If you go for HACS Mushroom cards, you might be able to do that with its entity card. That would be a consistent look.
With secondary_info: none
OK, will give it a try so my wife is happy with the look and feel ๐
Merci ๐
To save myself a little. The action starts only the FireTV Stick, TV and soundbar. Nothing else. So no red light or anything else ๐
Boo! 
anyone having issues with apex charts after 2023.9 ? can't really tell if it's a home assistant issue or apex charts issue :D sometimes it doesn't display the full timeframe set but when i change tab/menu back and forth it fixes it self. issue was introduced with 2023.9 anyway =)
it looks kind of similar to one of the bugs i had where valued didn't update after refresh but got populated after i changed tab back and forth.
but with a historical chart instead of just plain values.
Hello, I have this css for my cards to have a glassy background, but I cant make it work with mushrooms card
ha-card {
/* From https://css.glass */
background: rgba(255, 255, 255, 0);
border-radius: 16px;
box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
backdrop-filter: blur(9.1px);
-webkit-backdrop-filter: blur(9.1px);
ha-card-border-width: '0px'
ha-card-border-radius: '5px'
--ha-card-box-shadow: '0px'
}
``` any helps ?
The syntax for mushroom card is a bit different. Take a look at this post that I made a while back ago to get you started. #frontend-archived message
If you want to step up the card another notch, consider adding custom brand icons via HACS (https://github.com/elax46/custom-brand-icons). There's two Netflix icons you can use. ๐
anyone have any ideas?
I'm looking for help, trying to convert input_datetime to 12 hour on custon:button, getting confused doing this with JS
[[[ return `Enabled - ${states['input_datetime.alarm_time'].state }`
]]]```
this will return in 24 hour time but trying to convert to 12 hour
I want this , how to do ? Which card i use?
This screenshot is not my home assistant
I am use now this one
This is https://github.com/nervetattoo/simple-thermostat + a crapload of yaml, to have just the things I care about all accessible single-click
I have rejoiced a little too early. It seems that it is not possible to start the scene / automation directly. You always get to the "More information" first, because unfortunately there is no action to execute a predefined phase directly. Switching is unfortunately wrong

Starting scenes directly is possible. And automations are started by their triggers.
Hello, i'm trying to troubleshoot a card (picture in a glance) that i'm customizing. In the Service console of the developer tools it is working, but not when i put it in the card. there is any possibility to trace what happens when i interact with the card? in the deault log there are no errors neither feedback.
But how? I configured it this way and then I always get the PopUp where I need to click Activate as well:
cards:
- type: custom:mushroom-entity-card
entity: scene.wohnzimmer_rolladen_hoch
name: Alle Rollรคden hoch
icon_color: green
secondary_info: none
To format your text as code, enter three backticks on the first line, press Shift+Enter for a new line, paste your code, press Enter again for another new line, and lastly three more backticks.
```yaml
example: here
```
Don't forget you can edit your post rather than repeatedly posting the same thing.
Default tap action is more-info
It can be changed to call the scene.turn_on service.
entity: scene.wohnzimmer_rolladen_hoch
name: Alle Rollรคden hoch
icon_color: green
secondary_info: none
tap_action:
action: call-service
service: scene.turn_on
target:
entity_id: scene.wohnzimmer_rolladen_hoch```
Share the YAML of what you've done
@wraith umbra I converted your message into a file since it's above 15 lines :+1:
To format your text as code, enter three backticks on the first line, press Shift+Enter for a new line, paste your code, press Enter again for another new line, and lastly three more backticks.
```yaml
example: here
```
Don't forget you can edit your post rather than repeatedly posting the same thing.
@wraith umbra I converted your message into a file since it's above 15 lines :+1:
sorry i tried to put in order the c&p but discord didn't like it ๐
tap_action:
action: call-service
service: onvif.ptz
data:
distance: 0.1
speed: 0.5
continuous_duration: 0.5
move_mode: RelativeMove
tilt: UP
target:
entity_id: camera.yicucina_onvif_profile_0
...```
Would be my guess
Hm strange, I already tried it this way but nothing was happening. Nevertheless...thank you!!
oh... yes you are right.. it works in this way. Many thanks
I think the entity_id can be in data too... I'm just sticking to a known working service.
I imagine that there is the possibility to log the real time of what happens when you press a button. how can i do it? for troubleshooting purpose of course.
You can look at the States section of the developer tools or the logs. There are no traces for pure service calls afaik
ok, thanks again. UP and Down are working, L and R no but now i got the main issue.
my AC not list in esphome climate, like i have not this type entity climate.living_room
Good morning, did the side bar get fixed in this last patch?
What's wrong with the side bar?
Not showing up on casted devices
quick google shows ppl have been having issues with tablet/phone views for some reason
I don't recall seeing any fix like that recently. Is there a GH issue? If you look at that you'll know if it is or isn't in a certain patch fix.
Not sure I can look in a moment
craziest thing
You google it.. and everyone is trying to hide the sidebar lol
I need it back!
How can I display a picture, without it taking 100% of the card / row ?
card-mod = Win โค๏ธโ๐ฅ
Maybe someone here can help me out.
I would like to use the layout Sidebarfor one of my dashboards but I would like to keep one of the cards with a fixed width (default masonry width).
I wanted to use custom:layout-card with max_width: 500 for this, but the card still gets stretched across the entire screen.
Beinning of my card:
type: vertical-stack
cards:
- type: custom:layout-card
layout_type: grid
layout:
grid-template-columns: 3fr 1fr
grid-template-rows: auto
grid-template-areas: |
"main1 side1"
"main2 side2"
cards:
- type: custom:config-template-card
I m looking for help trying to convert
I think the right/left uses pan: instead of tilt:. (pan: RIGHT and pan: LEFT) https://community.home-assistant.io/t/onvif-camera-platform-how-to-do-ptz/197447/4?u=d_sellers1
Yes of course but doesn't work. I checked at very low level the soap call to the camera and are translated correctly in a couple of X/y coordinate exactly like up and down. At this point I suppose it could be something in the camera firmware. I already opened an issue on GitHub. But at the end of the story used a rest call without onvif and works like a charm
I did see references to using ContinuousMove instead of RelativeMove. I don't know what it all means. I saw your message and thought that that should be an easy fix. Guess I was wrong. ๐
ContinuesMove is not effective on my camera. But as I told you it depends on camera fw
Im having a mindboggling frustrating issue. I have two android devices (kindle Fire HD10 flashed with LineageOS 14). They're 100% identical. I have a markdown card that has a title and a bunch of text. On device A the markdown card renders properly. On Device B the title of the markdown card appears, but no text is rendered. If I remove the title, the "frame" of the card appears, but no text is rendered. Anyone have any idea what could be going on here / how to even begin debugging this?
Argh, for anyone that cares, they're not identical. Device B is using AOSP Webview and Device A is using Chrome Stable. ๐คฆโโ๏ธ
@tribal galleon They have a nice animation for viewing these, but only latest image available to grab ATM... here ---> https://www.swpc.noaa.gov/products/aurora-30-minute-forecast
I'm getting Lovelace elements are not loading . How do I fix this?
Hey. Not sure of the best place to ask this question. I have a card in my front end that shows all my automations as switches, so i can turn them off/on. At the moment, each time i create a new automation i have to manually add it. Is there a way to create a card that shows all automations, and automatically adds any new ones when i create them?
HACS auto-entities card can do that.
Ah just saw this. Thanks will look at that card now
What would i set as the filter to just show automations?
ugh, sorry! i forgot to turn the dam ping off
appologies
include:
- domain: automation```
FYI, the documents cover that...
I suggest you read up on them.
there's multiple examples that show how to filter to a specific domain
i did read the docs, but there was no sign of anything with the word "Automation" in.
dude, you don't need to look for that specific word
just look at the examples
I was not clear what a domain is to be honest
thank you by the way, this worked first time.
didnt work when i tried it in the gui, but in yaml it did
Hey ! I try to display an input_datetime with this format : 2023-09-15 (same as state display), but I can only get September 15, 2023. Is it possible without creating a sensor template ?
note the format: relative does not works
@strange heron I converted your message into a file since it's above 15 lines :+1:
Damn if someone can delete prev message would be great
Second question : I try to display a list of images + a date
i want to make a friendlier status for an entity that directly mirrors the entity state. How can i do that through yaml config?
you wana change the text display ? a sensor template should do it
@tribal galleon I really like how this looks with
custom_fields:
picture:
- filter: grayscale(.8) contrast(1)```
Can someone help me with a "Custom button" card that changes color depending on the switch state?
I tried converting a previous card from a mushroom chip, but this gave no result.
I only have gotten a single color to work, but I want it to have 2 colors
Red=OFF [with OFF MDI icon]
Green=ON {With ON MDI icon}
post what youve tried
type: custom:button-card
entity: switch.zr03_1_switch_switch
show_name: true
show_icon: true
tap_action:
action: toggle
icon: mdi:light-switch
icon_color: |
{% set state = (states(entity)) %}
{% if state == 'on' %} green
{% elif state == 'off' %} red
{% else %} yellow
{% endif %}
@misty mango I converted your message into a file since it's above 15 lines :+1:
custom button card uses all yaml to handle colors, take a moment to review the documents. It has examples that do exactly what you're looking for.
When I try to copy their templates I get nothing but errors
this may have to do with them using a different kind of layout
Mine when making one
Type: Custom: button
Theirs
-Type: Custom: button
that's just a listed item indicator for yaml
And how do I turn that into a usable card?
... by removing the dash, you aren't listing multiple cards, just 1
When I do that I get spacing errors.
It still does not help that the given examples are already using a list mechanic, and are not just a easy to copy paste templace code.
dude, literally replace the - with a space
here's the example i linked
- type: 'custom:button-card'
entity: switch.ac
icon: mdi:air-conditioner
color: rgb(28, 128, 199)
state:
- value: 'off'
color: rgb(255, 0, 0)
here's the example without the dash...
type: 'custom:button-card'
entity: switch.ac
icon: mdi:air-conditioner
color: rgb(28, 128, 199)
state:
- value: 'off'
color: rgb(255, 0, 0)
not really that hard.
you can even remove all the spaces here if you really want to be particular
That was what bugged me, Tried removing the spaces/spacing, but this just gave errors
because you don't understand yaml
spaces matter
this:
x: y
a: b
is not the same as
x: y
a: b
that makes a difference
if you can recognize patterns, you can do yaml
Iโm having a bit of trouble getting my HA dashboard to show consistently using Fully Kiosk Browser. Itโll be showing fine for a day or two, but then seemingly randomly just show this screen instead. Restarting the tablet doesnโt help but restarting my router does seem to. I have another Lenovo tablet (different model) that seems to work perfectly. Seems like a cache setting or something, has anyone else had this issue?
hi there, i'm trying to use an old media player script that I had running on my older instance of HA but it's not working on this one. It's essentially to send around internet radio stations to audio chromecasts around the house. If i post the script is anyone able to look at it and help me please?
@gloomy iris I converted your message into a file since it's above 15 lines :+1:
Does anybody know if something changed with the area filter?
I tried using a template for area but it only works when I enter the value manually.
In theory this
area: |-
${
if (states['input_select.dropdown_areas'].state == '-- - --')
{ '*' }
else
{ states['input_select.dropdown_areas'].state }
} //breaks card
should be identical to
area: Living Room //works
but Apexcharts card will not display anything, i.e. the card stops working.
does apex support templates? I don't remember it allowing that
looks like you're combining it with config template card maybe?
if yes, you have to follow JS rules
e.g.
${
return if (states['input_select.dropdown_areas'].state == '-- - --') ? '*' : states['input_select.dropdown_areas'].state;
}
Sorry, yes, I am not using the built-in templatesfunction but combining it with config-template and auto-entities. I should have mentioned that, sorry.
I found that if an entity is not assigned to an area, it is not filtered. It will be allowed using my template. So I need to figure out how to exclude all that are not explicitely assigned to that area.
P.S.: Sorry, I cannot delete the following message because the bot converted it
@gloomy iris I converted your message into a file since it's above 15 lines :+1:
Would be awesome to download the images and have a . gif compiled automatically and display that image ๐ค
I contemplated trying to do that be it is probably something that is out of the scope of Home Assistant as it is probably something that would have to run in the shell (as a script) and that's if everything could be loaded. It might be something better accomplished on another box (Synology, Unraid, etc). The downloading part could be done in Home Assistant and I've seen Linux stuff for the .gif compiling.
Yup... gonna take a bit of digging into ๐๐ป would definitely have to run outside and then pulled into HA, AFAIK ๐๐ป
Hi
@vast crane A couple of days ago you suggested an entities card being able to show the remaining time of a timer in real-time. I set this up and wrapped it in a conditional card to hide it while idle. When active, it would become visiible and countdown. Today, no countdown; only Active. I do see finishes_at and remaining attributes for the entity but I'm not sure how to use them. Did something change in the entities card or timer recently? On 2023.9.1.
An entity card can show the attribute but it doesn't countdown and shows unknown when idle.
The remaining attribute doesn't appear to be part of the countdown; only useful if the entity has been paused, hence, remaining.
Issue solved: my PC's time was off by four minutes. Guessing the time is rendered in the browser because the entity's last update was being shown as 4 minutes ago even though I had just started the timer manually.
Yes the card just shows the remaining time based on your browser's time, and the finishes_at attribute. If the clock is off, it can have weird behavior.
I thought for sure something had broken in HA. I mean, what are the chances that my PC's clock was the cause. I don't even understand how it got that far off. Router has an NTP server so something went screwy. All other devices on the network are tracking just fine.
Anyone use HA in Organizr's iFrame? It was working fine for me but broke after the most recent HA update. Not really sure where to look in HA for a solution, the error that chrome gives is Refused to display 'url' in a frame because it set 'X-Frame-Options' to 'sameorigin'
Read the breaking change for HTTP in the release notes, I think it addresses this: https://www.home-assistant.io/blog/2023/09/06/release-20239/#breaking-changes
Hi all! I have this card in HomeAssistant;
It display's like this;
I want to keep the text in the template to display last trigger, but as soon as the sensor clears, the text states "ingen rรถrelsedetektering"
Add ?disable_km to your dashboard's link to temporarily disable any modifications. https://github.com/NemesisRE/kiosk-mode#query-string-caching
Thx
is there any word if conditional cards will be able to accept templates in the future or more than just "state" and "state_not"?
This PR has had some semi-recent activity: https://github.com/home-assistant/frontend/pull/11539
It's not templates but it adds a lot more options to conditional card.
Hello! Question about resources. I added a yaml dashboard to my existing UI dashboards. I now lost some cards in the UI dash, because the custom card resource canโt be found. How can I have all the resources I install available to my UI dash like before? Or where I need to add them?
If you use UI mode and Yaml mode, all resources must be managed in YAML only.
Man what a mess. How do a load them for my UI dashboards?
The Yaml dashboard has a reference to the resources it needs. The UI ones don't. Now many cards are not showing up anymore. ๐
In yaml only
e.g.
I'm not sure if that's right... I have an instance with UI dashboards and yaml dashboards and I use the UI for resources. Could you elaborate on that restriction a bit?
Last I checked (3 years ago), in order to use Yaml resources and UI resources, you need to delcare & manage the resources in YAML
You're talking about like custom-card .js modules right?
Yes
I'm guessing that might be out of date.
so you can use ui included resources in yaml?
that's lovelace gen
it is nuts
but I haven't touched my UI in 3 years, it just auto generates for me
seems so
Wow
That did explain something
When I tried to define Lovelace.yaml I was having a duplicate key for Lovelace mode, even if I didn't have it in the configuration.yaml
How?
Yeah, I'm interested too because I don't like managing the resources in yaml
Because they stopped working for me and no way
@vast crane I converted your message into a file since it's above 15 lines :+1:
resources page:
lovelace:
mode: storage
# Add yaml dashboards
dashboards:
lovelace-yaml:
mode: yaml
title: YAML
icon: mdi:script
show_in_sidebar: true
filename: dashboards.yaml
I tried to storage mode, still the same.
I'm not following the question.
ok well I have mode: storage, not sure if that matters
hmm, that might be it
I'm 99% for UI dashboards, but I just added this yaml one to test the flow
its some kind of mixed mode?
Ok so how can I add the storage mode with a pre-existing yaml dashboard with two views?
Ok yeah the resources key says "Only use this when mode is yaml". So I guess that's what matters, not whether or not you're using a yaml dashboard.
I'm using mixed mode by following this section:
You can also add YAML dashboards when your main dashboard is UI configured:
https://www.home-assistant.io/dashboards/dashboards/#adding-more-dashboards-with-yaml
I am trying to test this dashboard https://github.com/VigoKrumins/hass-config
and it's quite a mess, I had it working, and I learned so much. But themes and my old UI dashboards are not completely working because of the resources
but you'll need to manage things via yaml if you plan to use both
What's the advantage to using mode: yaml versus mode: storage?
I need it for lovelace gen
because my overview dashboard is yaml
taht guys overview dashboard appares to be yaml
the overview dashboard is the main dashboard
it is a mess btw, but it's only a mess for veterans, so if you want to go backward, just undo what you did and go with a normal yaml dashboard
not as your main dashboard
@vast crane so the old way of doing this before your times was a file called lovelace-ui.yaml, which is the main default overview dashboard when in yaml mode.
this was before multiple dashboards was a thing
it gives me an error
You have to create that file, you can also just use what the documents have too without using the includes like I do
I posted 2 links
I did it
1 link to my file, 1 link to how I add it to configuration.yaml
the lovelace.yaml is there
ok, and how did you include it?
if it's in your root config folder, then you just include the file not /config/<thefile>.yaml
right, so is the file in your root config folder or do you ahve a config folder in your config folder?
is in the root
then it should be included like lights.yaml is above it
right
let me troubleshoot this a bit, I'll be back with some more question. I will dig in your repo @tacit cave , that's amazing, but definitely super complex for me.
well, don't dig too deep
it's overly complicated, so much so that I don't bother touching it
it also uses lovelace_gen which will definitely be over your head if you don't know how to code.
I read about it yesterday and I passed right away
It's used by many of the big UI's that are out there and all fancy
for clarity, my issue is that I added this dashboard https://github.com/VigoKrumins/hass-config to my config and had to switch lovelace to yaml mode causing a mess on my UI dashboards.
be back
but they usually fork it and build it into their code. Like dwains theme
oh man, I got it working
how do you manage themes? Now I have no themes applied to my dashboards. I guess I have to manage them via YAML as well
still no resources for my UI dashboards, can't find a solution for that. How do I know frontend vs backend module?
Hi. I'm not sure if this is a problem with my installation or with Home Assistant. When I click on the panel for my fan, it activates and immediately deactivates swing mode repeatadly, even if I don't click on anything. How can I check where these commands are coming from? There is nothing in the log for the fan itself.
I would start looking into the device integration and what entities it has. From there you understand what it can be managed and not before you add it to a card.
@tacit cave @vast crane I've been racking my brain to try to figure this out if it is even possible. I have a custom: button-card template with variables defined. All works fine. I added a conditional card containing an entities card which also works fine with hardcoded entities. My problem: how can I pass a variable for an entity into both the conditional and entities cards from the custom: button-card template (if those cards can even accept it.)
Also, it seems I have to use the entities card as no other card seems to show a timer entity counting down; they only show the state or don't update in realtime if math is applied.
Could a decluttering card pass variables into both JavaScript- and Jinja-based cards? Even if the Jinja-based card is nested in a JavaScript-based card. ๐คฏ
I think you'll have to maintain a both entity_id entries
This is why I use lovelace_gen
because all these cards don't play well together, it's easier to just auto generate your UI if you want to minmize the overhead when creating configurations
Thanks, but I made the fan by myself in a template. It supports swing, but it repeatadly switches the swing state and sends it to my fan without anyone activating it
then you got to look at what you made and what the device supports. Something is off
Yeah, thats also my guess. I'm just wondering, because in the versions before 2023.9 it worked flawlessly for months
it's annoying but if you look at the changelog you can catch what happened
Is there another changelog than the blog entry on home-assistant.io?
Github? But should be exaclty the same
Yeah, in github is just a link to the blog post
this is a start to see if there is anything you were using in your template that can be fucked up
@tacit cave I found out that my tablet user can access the dashboards with the all the cards working, while my admin account doesn't
I am so confused now
that would just be a simple caching issue on that device
I have trying incognito but no bueno
๐คทโโ๏ธ it should just work if you have them declared in yaml
not sure what to tell you
I know, look I have no idea how this can happen. Two Incognito browser sessions, on the left the tablet non admin account, on the right my admin account.
it's all good, trying to brainstorm with the smartest
this 100% of the time is always a caching issue or incorrectly configured resources
there are no other issues
literally
maybe you aren't specifying the resources properly in your yaml ๐คทโโ๏ธ
well, it should affect the whole integration, not only one account
that's not even admin
no that's not true
you could be hitting caching issues
where it's pulling up old cache on any of your views that you're using
are talking of browser caching issues? Or HA kind of caching issue?
browser caching
because when you start an incognito session, you are not bringin in any cookies ๐
I don't see how can that happen
๐คทโโ๏ธ
I always CTRL+F5 w/ dev tools open
on a desktop w/ chrome
as that always gives me the real results
what is the difference between declaring resources in the lovelace.yaml and frontend.yaml
frontend is for themes
lovelace has the resources
if you're referring to https://www.home-assistant.io/integrations/frontend/#loading-extra-javascript that's for more advanced things
so card module are not going in there?
no
how about you just post the yaml as text, not an image
I also hope you understand that you need to restart HA when you add yaml resources
no way aroudn that, reloading yaml does nothing either.
Yeah, I got that. Thanks
trying to figure out what module is missing and where
I don't play with Frontend for this reason. Automation is all we need, AI and Automation.
i put a non-existant url when adding a view to the top bar and i cannot click it to delete or edit it. it does not show the yellow pencil to edit
i guess delete with raw editor?
pic?
I was able to delete with the raw editor. thank you.
I wanted to add an icon up top to link to one of the add ons. is that possible?
a button here
that points to here
I have a question regarding the Energy Dashboard.
I don't have one value available which gives me the total amount of Energy delivered to the grid. My smart meter gives me 2 values (one for peak hours and one for off peak hours) so I created one sensor myself which adds the 2 values as follows
sensor:
- platform: template
sensors:
total_power_to_grid:
value_template: "{{ states('sensor.p1_electricity_produced_peak_cumulative') | float + states('sensor.p1_electricity_produced_off_peak_cumulative') | float }}"
unit_of_measurement: kWh
But I can't select the sensor 'sensor.total_power_to_grid' in the "Return to grid" selection box. So I was wondering do I do something wrong or do I need to add elemets to my sensor creation? Any help is appreciated.
better to ask in #energy-archived, but you're likely missing state_class and device_class for that template
couldn't you just add both of those sensors to energy instead of trying to sum them? it might give a more interesting picture.
No I don't want to see the difference between both of them to be honest but I will move my question over to #energy-archived ... thank you for your time
You should be able to pick any sensors in that class. Did you use Utlity Meter?
I did not use Utility meter. I have read the help about that and found it to complex.
Do I need to add device_class: Energy added maybe (hmmm tried that wasn't succesfull also)
@marble umbra I converted your message into a file since it's above 15 lines :+1:
the value that is summed up from your sensor has to be in a category. you can apply it everywhere. For the Energy automation and dash Utility Meter helpers are ideal.
Does anyone know how I can make this? Right now I just edited the html in my browser of the card_room template
The Minimalist dashboard relies on heavily templated custom:button-cards https://github.com/custom-cards/button-card.
You should be able to add four entities in the spot you've marked for AC & lights.
Looking at your code you posted above, that's not going to work but you're thinking along the right lines. The code you used is Jinja but that card relies on JavaScript. I have some stuff that might help you out.
@mystic timber You have any suggestions for him?
Does anyone know how I can make this
Casting a dashboard to my Nest Hub is kinda slow. Is there a way to speed it up? Using Dashcast to cast a video stream starts much faster for instance.
I figured that would be the case, but I was still holding out hold that a magical option would appear. I briefly took a look at lovelace_gen and I could probably make something happen with that. But, for the time being, I'll just have to live with have a few lines of extra code to override the template's entity.
I think it turned out kind of cool. (Timer set to 10 seconds for demonstration purposes. Automation handles starting timer and turning off lights when timer elapses. Double tap to enable/disable the automation helper.)
interesting problem. im trying to have a custom card space the text to the same length as an official entity card. any advice?
the top is a regular card where you input entities, and the bottom arrow is my custom card made with html
i cant seem to space it exactly the same
i tried using   but it doesn't line up (the one at the bottom)
Hi There, I am using the stack-in-card in my dashboard, is there any way to reduse the size of the space above and/or below the mushroom-title-card? Thank you!
card_mod:
style: |
ha-card {
margin-bottom: -20px;
} ๐
why are you using a custom card, just put the last update as a template sensor and be done with it.
You'll spend more time with formatting that custom card than you would just making a template sensor that does the same thing.
that will just work in all cards
Consider adjusting the padding instead of the margins. It might get a little better spacing.yaml card_mod: style: | ha-card { border: none; padding: 10px 10px 0px 10px !important; text-align: center; }(top, right, bottom, left)
Or you can specify individual settings such as padding-bottom: 10px !important;. text-align: center; can also be useful if you like it.
Edit: Please don't mind the typo in Living Room Lights. I just used a mushroom-template-card for the example...
My brain is foggy this morning. What do you mean?
@tame oriole Didn't realize that was you that had posted the question earlier. Are you trying to get a Markdown card look like the stock entity card? What kind of craziness are you trying to get the card to do (or is it more just proof-of-concept)?
My custom card is taking the input_datetime and turning it into how much time elapsed. For example; instead of showing me the variables value of 703AM, it now says 00:37:00 which is 37 minutes ago.
Make a template sensor. Use that in the ui in a normal entities card with no customization
You mean this?
I have a duration counter on some of my main buttons. But no template sensor for me. This sits in a custom:button-card tempate. yaml last_changed: |- [[[ if (entity.state === 'on') { var last_changed_in_minutes = ((new Date().getTime() - new Date(entity.last_changed).getTime())/60000).toFixed(0); if (last_changed_in_minutes < 1) return; if (last_changed_in_minutes < 60) return last_changed_in_minutes + " min"; if (last_changed_in_minutes >= 60) { var hrs = Math.floor(last_changed_in_minutes / 60); return hrs + " hr" + " " + (last_changed_in_minutes % (hrs * 60)) + " min"; } } ]]]
Yes
Wait. There's a template helper? When did that happen?
Guess I didn't pay close enough attention to release note.
When I made what I did, that wasn't available lol
Guess not, itโs a major section
Template sensors were added in HA .1x. It definitely existed.
.1x was circa 2015. They predate me using the software.
My custom card is this. Sorry I am in mobile ATM
<table width="100%" style="margin: 0px">
<tr>
<td><font color=44739e>  <ha-icon icon="mdi:clock"></ha-icon></font>      Litter-Robot - Last Update:</td>
<td align="right"><a href="/history?entity_id=sensor.litter_robot_status_code"></a> {% set time_diff_seconds = as_timestamp(now()) - as_timestamp(states('input_datetime.last_changed_litter_robot_litter_box')) %}{% set total_hours = (time_diff_seconds / 3600) | int %}{% set days = (total_hours // 24) %}{% set hours = total_hours % 24 %}{% set minutes = ((time_diff_seconds % 3600) / 60) | int %}{% set seconds = (time_diff_seconds % 60) | int %}
{{ '%02d:%02d:%02d' | format((days * 24) + hours, minutes, seconds) }} </td>
</tr>
</table>
I can recreate that in a template sensor?
Just put the template result in the template. Remove the html. Yes.
Hmm. Ok. I will try that later when I can get on a computer
Just copy/paste. You can do it on mobile using the helper
Interesting. Is there a way to change the icon instead of that eye
Sorry it's early lol. I see that now.
I guess it doesn't update as quickly but it works and is lined up
that will update once per minute. Even in the frontend it will update once per minute.
or, it will update when you change the input datetimes
What's the difference between front end extra modules and lovelace resources? Having an issue with mushroom and some icon packs just taking to long to load so they are unavailable on the first render
I'm following these instructions (https://developers.home-assistant.io/docs/frontend/custom-ui/custom-card#tile-features) to create a custom tile feature (for scene selection). If I follow the instructions then I can't click the button(s) because it does not seem to be the topmost layer? If I'm using Chome dev tools to select an element, it can select the brightness slider feature (the one that comes with HA, as seen in the first image), but not the custom features (the second image shows the entire card highlighted when I hover the custom feature). Anyone an idea how to solve this?
as a sidebar, there should be a zorder setting, but I don't dev for the frontend, so ask your question there
Is there a website with a bunch of examples and templates in Javascript for Home Assistant?
I have a few jinja templates that I would like to "convert" to Javascript so I can use it with config-template-card.
Kind of like a Javascript equivalent of the https://www.home-assistant.io/docs/configuration/templating/ site?
The documentation for the card and the many, many JavaScript resources on the web
There is no official HA card that supports JavaScript
No, but the official cards, with all due respect, are "suboptimal". Without custom cards HA dashboard would be dead.
The problem is primarily getting the information from HA. Accessing all the states, areas etc.
The config-template-card github readme has very little information because it of course targets people who already know how to code ๐
Sorry karwost, but thomasloven's and iantrich's cards are the basis of most good dashboards out there. Imagine HA without them. The only stock cards I use are stack and grid and sometimes entities. And never without auto-entities, config-card-mod or the rest of the custom features.
I easily can imagine it because that's how I use it everyday.
You don't use mini-graph-card or any other cards?
Not hating on custom cards, but just saying I'm a strong disagree that HA is "dead" without them.
I think in this case, most people would disagree with you ๐
๐คท
But it is a community for a reason and open discussions and dispute are good.
A lot of criticism has lead to improvements of the dashboard.
But templating, regex entity creation etc.....
Of course, I'm not saying it's ever been perfect, and improvement suggestions are always welcome.
And it will never be perfect ๐
Nothing will ๐
But would you agree that HA is very difficult to use for people who want more than just the basic dashboard cards?
Jinja, Javascript, Python..... pfuh....
I use one grocy-chores-card because I like the way it interfaces with the task tracking, but otherwise that's all I use.
So instead of templates you create dozens of helpers? Or type in lots of entity names?
E.g. I have exactly one graph card. The input I chose via dropdown or tet input. Not possible without all the custom cards. I would have to edit the card everytime (not possible in a mobile device).
But anyway, still looking for a few examples on how to get information from HA via Javascript.
I know how to get the state of an entity, helper etc.
But more filtering e.g. like
states.sensor | selectattr('name','search','Sony.*ENERGY Power.*') | map(attribute='entity_id') | list
I have no idea where to start
There's no 'one' javascript template language right? I thought each custom card implements its own js templating. So I would guess you just need to look at examples for the card you're trying to use.
The cards do not have templating. I am using config-template-card to add that feature.
E.g. passing the number of columns to a grid card.
Almost all those jinja filters have similar JavaScript functions. You can find the on somewhat every JavaScript documentation site
states.sensor | selectattr('name','search','Sony.*ENERGY Power.*') | map(attribute='entity_id') | list | count gives me the number and then I perform a maths operation. But in JS.... no idea ๐
does it just execute raw javascript?
"pretty much any valid Javascript on the hass object" according to the dcos
You don't know that card? I am shocked ๐
And then everything is $hass.states.sensor?
Because JS needs to access the sensors, entites etc.
That is not JS syntax ๐
$hass.states.sensors.entity_id.name.search('Sony.*ENERGY Power.*')
Looks absolutely no correct ๐
hass.states is a javascript variable
Yes. I think HA uses devices as objects. So each entity is an object with properties like state etc.
But for instance, if I do not know the device, how do I search through all entities for a match? I need the object above device.
I think this would be all the entities that contain "Sony":
Object.values(hass.states).filter((entity) => entity.entity_id.includes("Sony"))
learning how to use the web developer tools, breakpoints, and debugger would be helpful
True, true. But I was hoping that I would not have to become an experienced JS, Jinja and Python coder to make a nice little card ๐
One, maybe. All three... pfuh....
Esepcially since it is a bit more difficult to test because the dev tools are for Jinja and cards are a very bad test environment
So docs like the templating docs of HA really help a lot with those examples.
And maybe on a side-note: I love to get things to work well for me. And I have found three great graph cards now and all have their own syntax and each need support from other cards and templating of some sort.
So I am finding it very hard to get a nice looking dashboard. With proper data representation, that is. Pretty is easy. Useful not so much
Could somebody help me with a quick Python dictionary question?
I would like to write this
row:
colors:
- white
- transparent
opacity: 0.1
like this
'row': {
'opacity': 0.1 },
But I cannot figure out how to make two entries with the leading hyphen.
I thought it would be
'row': {
'opacity': 0.1,
'colors': [{
'white',
'transparent' }]
},
Got it on the one millionth try -.-
'row': {
'colors': [
'white',
'transparent'
],
'opacity': 0.1
},
strangely it looks like the custom card with custom HTML updates a tiny bit quicker
I like Mushroom
Is there a front end that lets you specify putting something across the entire top then breaking something into different columns underneath that for example?
what is "something"? a card?
the whole dashboard
Are you looking for the whole dashboard to be made for you? Generally speaking, there's no one size fits all when it comes to dashboards. It's all what you want to see and how you want to see it.
im trying to arrange things similarly to how I did it in openhab:
when I use the sidebar option things are not aligned quite right
seems like you just want a 1-card panel, where that card is a vertical stack
Like karwosts mentioned, you'll need to use a combination of layout-type cards to achieve to look you want. I use the 1-card panel setting and start with a vertical stack card. From there, it could be horizontal stack or a grid card is useful. There's also the custom:layout-card or custom:stack-in-card (but those have to be added, which is not hard to do).
Something like this screenshot is a grid card set to 4 columns. (Custom:button-cards shown for the buttons.)
. REPLYING FOR A FRIEND PLEASE IGNORE
Is there a way to change the padding or heights of cards on a 1 card panel?
Yes, thatโs what they all do. Just an exec
Itโs the same code, both executed through the same engine. No way the frontend is a tiny bit faster because it has to go from the frontend to the backend where the template is just registered in the backend
so I got the layout-card working but I dont think there is a way to specify the card heights individually?
It depends on the card. Some cards have their own styling capabilities. Check the docs for the respective card. Some cards are not as easy (particularly some of the stock cards) but that's where card_mod can come into play. https://github.com/thomasloven/lovelace-card-mod Again, each can have different syntax in order to make the appearance you're looking for.
These two cards, for example, are both Markdown cards. The top one is two lines of yaml; the bottom one is 47 lines long (32 of which is card_mod code).
Hey all. I don't have much experience with dashboards and am making my own. This works great on mobile but i'm having difficulty formatting for tablet. Things are just... all over the place. Am I better off making a separate tablet dashboard?
interesting, its clearly ahead on my end, even after a restart (markdown card is the one at the bottom). its the elapsed time and its higher meaning it updated first. not a big deal just something i noticed
i would, nothing is perfect, tbh
Any suggestions on a best route to go insofaras using Minimalist for a tablet dash? Or is there a more "out of the box" solution that's customizable for those of us who are less proficient in coding languages?
So I don't know a whole lot about it but there are ways to set up your dashboard to use different layouts depending on the screen width (phone vs tablet). The custom:layout-card can handle different layouts with the <mediaquery> options. You can look over it here: https://github.com/thomasloven/lovelace-layout-card#card-visibility
I, personally, would recommend separate dashboards for phone and tablet. My tablet's dashboard, for example, works great on a tablet but looks horrible on my phone. But, I also have it designed for bigger buttons and information that I would want to see on a tablet-based screen. The good thing is, it doesn't take much to copy&paste some code between dashboards and do a little tweaking as needed. Even tablet dashboards of different sizes may need some tweaking. I have different dashboards for Amazon Fire 10s, 8s, even 7s (though I don't use the 8s and the 7s any more) and an Echo Show 15.
I don't care for Minimalist too much. It is nice and all and certainly a lot of work has gone into it, but it is someone else's design and what they like. I design my dashboard for what I like and add small improvements as I learn something new or help someone else figure out how to get something to work in a certain way. I have many views dedicated to just experimental and reference material. It looks like you're already designing what you like based on the screenshot so just keep going with it.
Check out the Mushroom card topic in the forum: https://community.home-assistant.io/t/mushroom-cards-build-a-beautiful-dashboard-easily/388590 and the custom:button-card topic https://community.home-assistant.io/t/fun-with-custom-button-card/238450/ for inspiration and examples. (Tip: I tend to just scroll and look at the pictures until something catches my eye.) Then, there's always card_modding https://github.com/thomasloven/lovelace-card-mod for making cards do what you want (even though they may not want to.) ๐
Higher value means it updated later. Youโre subtracting a time from now and now marches forward. I.e. now() - past will be larger on whatever updates second.
hey, where are the standard HA frontend cards saved ?
such as this one https://www.home-assistant.io/dashboards/weather-forecast/
I'd like to change this value with a value coming from a local sensor
If I am not mistaken, all those values are coming from one entity.
yup
So the only way of using that card and changing the value would be by overwriting the state of that entity's temperature attribute with the state of the other entity's temperature.
oh, I was not aware I could overwrite a value
Or build your own card out of e.g. grid + entities or similar.
I was thinking about forking the card and replace the value with my sensor but that would be a bit overkill maybe
If you go to dev tools and then states you can set any state of any entity.
And that can also be done via automations.
If you know how to do that, that would be much better than overwriting the state on every change
Quick question to everyone: Is there a way of keeping HA frontend from re-formatting my card's code?
The line breaks keep getting messed up by HA. I just want to set them myself.
What's the name of the service that can modify the value of a sensor ?
I am not sure, but I think hass.state.set
Maybe check in #automations-archived if it does not work ๐
There's no service that can change a sensor value.
What you can do is create a template weather entity: https://www.home-assistant.io/integrations/weather.template/
Then show this template in a weather card.
hang on, this has to be backwards. If I'm looking at the hours, minutes, and seconds elapsed between the current time and the time when "input_datetime.last_changed_litter_robot_litter_box" was last changed, and I have the markdown card showing a larger time, that larger time would mean it's showing the most up to date value since it's closer to the real time "right now", meaning the lower value didn't refresh yet, because it's the same code for each one. When I cycle my litter robot, both values reset to 00:00:00, and when I refresh my page manually, the markdown card will be a few seconds higher because it refreshed before the other card did.
Hi there, I have what I hope is a simple question. I am setting up Simple Thermostat, and was curious if there is a simple way of getting the State Variables to be Titled (proper case). For instance my solution right now has been to redfine the names, but I can't seem to figure out the State variable.
thanks so much, I will check out the card mod
maybe I am missing something, I tried to change the height of this card and it does make it the right height but.. it cuts it off
You may also need to specify a width. the card may also have a minimum height in order to fit everything in it. Cards also may not necessarily scale properly.
Anyone know how I can change the name of the items in a legend on a statistics graph? I want to change from "Weatherflow Air Temperature (mean)" to say "Temp"
https://www.home-assistant.io/dashboards/statistics-graph/ this doesn't show anything that indicates a property I can change, but i've seen some examples of using CSS to change the values. But I can't find any decent example/instructions.
Some custom:mini-graph-card testing
Ahh this looks like an answer, https://github.com/thomasloven/lovelace-card-mod
If you set the name you can get "Temp (mean)", but there's nothing in the default card to remove the statistic type.
@warm sigil card_mod can do just about anything, but I'm curious. Looking at the docs, it shows you can override the friendly name. ```yaml
type: statistics-graph
title: 'My Graph'
entities:
- sensor.outside_temperature
- entity: sensor.inside_temperature
name: Inside```I'm assuming in this case it should showsensor.inside_temperatureasInside. Is that what you're looking for?
karwosts failed to notice your message as I was typing and copyingpasting. Guess you answered my question before I even asked it. :lol:
it's not the friendly name I want to override, it's the string used for the names in the legend. I'm reading up now on how to do this with card-mod
Isn't that essentially the same thing?
Or do you mean you don't want to affect the tooltips?
Another options is to remove the legend entirely and add a custom title.
I want to change these...
Yes, that's what setting name: does.
Could always build a custom:button-card with the graph in it and the legend hidden and then throw some custom fields to act as a hard-coded legend. ๐ค
My current code is,
- chart_type: line
period: day
type: statistics-graph
entities:
- sensor.weatherflow_air_temperature
- sensor.weatherflow_feels_like_temperature
stat_types:
- mean
days_to_show: 14
title: Temp
ugh, how do I paste code into Discord?
three back ticks (by the 1 key)
So you're cool with the (mean); just wanted a more meaningful name?
Would be nice to remove the (mean), but this is a lot better
Hi i want to ask a question about how to colour a gauge to be used as a severity rating but not as a per value colour more like a gradient of a colour palette. Ex: for my use case i use a colour gauge for checking wi-fi strength for my ESP and i want to have a colour gradient from worst (-100dBm) red and best (-60dBm) green. The current setup is only capable to my knowledge to include colours to specific values like -80 orange and -85 yellow and nothing in between.
My current config is: type: gauge entity: sensor.wifi_esp max: -50 min: -100 severity: green: -80 yellow: -85 red: -90 name: Wi-Fi ESP
Does anyone have a solution to this problem? I don't have any notifications but their number is sky high all the time. After restarting HA sometimes it is ok, sometimes it throws it away after some time. I went through several versions of HA Core but it doesn't change anything.
I've never seen that, nor ever seen anyone report that issue on github.
I was looking for some information about it and found nothing.
You won't be able to achieve a color gradient due to security restrictions browsers place on SVG code because it is technically executable JavaScript (or something like that) although you might get it to work in Firefox. You can read more about it here. https://community.home-assistant.io/t/gauge-card-how-to-get-a-gradually-changing-color/486987/12?u=d_sellers1 I have a post at the bottom where I tried some stuff.
I have another post where I applied a gradient to icons based on battery state but that won't work in this case. Really the only option is to define a different color for each step... It works but not great. Screenshot is from some of my experiments:
I didn't expect this to be that complicated, and since i want it to work across multiple platforms and not just in ff i have to manually define the colours myself unfortunately.
In the screenshot above, the first gauge is an actual working gradient but it is shown in Firefox. The bottom two have hard-coded colors at 3% steps. They look pretty similar to the first guage but there's definitely a noticeable blocky-ness to them. They really need values for each 1% but I haven't messed with it too much.
I have a 2 step increment gauge for every colour and it is noticeable too.
If you're looking to avoid repeating 75+ lines of code for each gauge you want to show, consider the decluttering-card https://github.com/custom-cards/decluttering-card. You can define your gauge once in the Raw editor and then call it using variables. ```yaml
type: custom:decluttering-card
template: gradient_gauge
variables:
- entity: sensor.living_room_motion_detector_battery_level
- name: Living Room Motion```
Thanks, but i wrote it once and copy pasted it to the others, it will clutter the HA if i include more tools ๐
If you could see how much I have loaded on to my HA box... I, personally, don't think adding a couple of custom cards, integrations, or add-ons will affect performance. And I'm running on a RPi 4.
I just looked and I have 45 extras added to the front-end via HACS. 20 add-ons including AdGuard and Node-RED. and 30-something integrations.
Wow, i keep it to the minimal, i only have 5 integrations in total.
and some of them are only running if i need them
Is there a way to add a circle behind the Nest temp? Even better would be to change the color depending on what it's doing (heating/cooling/dormant)
Is it possible to disable auto-formatting of the cards in HA? When using templating, the code gets rearragned by HA and it makes it much more difficult to maintain for me newbie (especially since commenting does not seem to be supported)
don't think so
Hey there! New to HA and have a question on dwains dashboard, hopefully this is the right place to ask!
I'm trying to use a FB portal browser for my control center. I don't have too many automations, so have everything on one page. How do I hide the left bar which shows areas and people?
I am using the Mushroom person entity card, which has Secondary information that only allows a default set of choices. The default choice is the Zone. I want to put something custom there from the HACS Places integration such as {{ sensor_location.person }} which shows the geolocated location, but I can't seem to get it to work. I started playing with a custom card, but it has limitations - it doesn't show the icon for home versus away versus in a zone on the picture of the person. Is there anything that could do what I want?
Any chance there's a way to show a (read-only) date-time in the default Overview dashboard for a custom event entity? I have a custom MQTT event entity I'd like show up there; I don't have a custom default dashboard.
I'm wanting the title card (being the basement & the icon) to be centered to what my display is since my fiance & I use different display sizes but if keeps going to the left.
I also would like to switch the icon & the title if possible
I am using the Mushroom person entity
Hi All, im trying to make a button to change the view, any idea why this does not work? yet /lovelace/default_view does?
- show_name: true show_icon: false type: button tap_action: action: navigate navigation_path: /dashboard-tablet/default_view hold_action: action: none name: Home
is the path to the dashboard actually /dashboard-tablet/? I forget how to name them. One of my dashboards is called dashboard-lab even though I only called it lab but another one is called fire-main.
Thanks - needed to check the URL its now working ๐
anyone know how to float all the text and icons in a mushroom template card to the left? I have card-mod and have changed the font sizes but cant see to get the text-align: left working
Well, you said "update first" not last updated. So I was explaining what one was updating first ๐
the template sensor is 100% updating first, which is why it has the lower number.
the template in the frontend can aslo be updated with a page refresh on top of the minutely updates that the template naturally has.
Only by fully embracing YAML for the dashboard. Then your templates will not be changed and comments will be supported
2.5 years experience... I don't think you are a newbie anymore ๐
Newbie in JS/Jinja, unfortunately.
I keep learning new stuff but in 5-6 different languages due to work and then I always get stuck in some detail that I need to get around a default limitation.
So frustrating when you think you have it and then.....
If you know code, you shouldn't have any issue with JS or Jinja
I 100% did not know JS and picked it up in 5 minutes by googling the syntax and functions that I want the code to do
Jinja is a tad harder to do that with because there are way less resources, but ansible is close.
But JS, just google what you want. Don't include "home assistant" in your search, you'll get 82947982349823 answers that will work.
But getting it integrated into cards makes it harder.
Because you don't just need to get the code to work by itself, you need to find out which attributes etc. HA exposes and then somehow get the card to work with your code.
And that is tricky because cards only support templating in certain cases or with the help of other cards.
it's really not that tricky
For you ๐
pretty much all the JS template engines out there have 1 way to access entities
Feel free to solve my templating problem to get two cases working with one card ๐
states['entity_id'].state and states['entity_id'].attributes
some offer entity.state and entity.attributes which is pulled from the cards configuration
other than that, it's 100% JS and unrelated to HA
Yes, it is not so much the syntax but where the source information is and what it is called. Like working with areas is less well documented than entities.
But yes, overall it is easy if you are good in JS and or Jinja
But I really find it hard to pass the information to the card in the right way.
areas just simply aren't available
What I'm saying is you don't need to be good at JS
They are
I amnot good at JS, I'm good at python. However I can code w/ JS by simply googling
which card offers area support in JS?
ian's card hasn't been updated in years and last I checked, custom button card doesn't have it
Yes, if you are good in programming in one language, you will quickly be good in another.
I manage to solve what I need to in multiple languages, but for some reason, when it comes to using it in HA cards, I struggle.
The cards do not offer area support (except auto-entities) but you can access area information through jinja/js.
No you can't
you can't access area's through JS
jinja yes, JS no
unless you can point me to a JS card that does, all the cards that support JS tempaltes are old and thier api predates areas
custom button card was recently updated and might support areas
Yeah, button card does not support areas
so, I'm not sure why you have this idea
Okay, I thought if Jinja can then JS can.
I mean, if the card supports JS.
๐ that I know
100% different languages
No, it has to be built into the api in order to use it
And the api does not support the same for both?
no... its 2 different languages
See, that I did not know. No wonder I fail even more often than I should ๐
But I am trying to move away from JS and stay with Jinja. Because config-template-card seems to slow things down quite a bit.
console.log(hass)
Gives you all the information HA exposes to be used in JS. You can easily do that in the dev-console of chrome
the templates don't have access to that object
well, custom button card has a hass object
but it's not the same as the hass object in HA
Why does HA not support Jinja templating "globally"?
Why is it required that a card offer templating rather than Jina being useable in every card?
Is that a problem in lovelace or a problem with each individual card?
because it's not built into the frontend. The frontend has to send the jinja to the backend to get the answer to then serve it up on the frontend
JS templates for button card -> https://github.com/custom-cards/button-card#javascript-templates
which is different that the JS templates for the config template card -> https://github.com/iantrich/config-template-card#available-variables-for-templating
which is no-where related to anything jinja
the config template card actually has access to the hass object but it's under this.hass
but notice that you have to use the documentation for the card that you're using. You can't just mix and match languages/apis and expect it to work
No, I cannot expect it to work. But that is where the trouble starts and why I find it much more difficult to use code in HA.
Each card has its own syntax and them some want JS and some Jinja and some don't allow either so you need a different card to supply the card you actually wanted to use....
Come on, that is not the same as coding outside of the HA frontend.
so, you're upset that people make custom cards and don't all follow a unified language?
HA offers a unified language, jinja. It's up to the person who created the custom card to use that or not.
No, I am generally not upset with anything ๐
I am just saying that it may all seem simple to you but there are a lot of people who struggle with HA simply because the stock cards are not sufficient and the custom cards are truly needed to achieve your goals.
So you are "forced" to somehow trick HA frontend to do what you want by using different custom cards with different syntax.
It is not easy to get what you want without failing a lot.
And some cards have little documentation because the authors of course find it simple. But it is not.
Take the decluttering card. Hardly any docs. I tried it, I failed a few times, I decided I just did not have the time to understand yet another card. Especially not without knowing if it can actually do what I need (which I don't think it would).
decluttering card doesn't need alot of docs tho...
it's just a yaml holder
you know yaml, you'll pick up decluttering card in ~2 seconds
it's basically an anchor on steriods
Then how do you declare a variable inside a card that you did not create a variable for in the yaml?
I mean, in apexcharts card I did not want to define 50 times entity variables in the template.
Can you just define them in the card? If so, how, since they are listed under 'series:'.
Anyway, I did not find it self explanatory unless it simply does not do what I thought it could do.
According to the docs I would have to do
series:
- entity1: [[blah]]
- entity2: [[blah2]]
and so on
I'm not following your question, just declare the variable in the decluttering template
So I would need to declare entity1 to 20 in case I want to plot e.g. all my temperature sensors in one chart?
Good I gave up then ๐
if the field expects a list, you can provide a list
i.e. 1 variable that's a list
it 100% dependso n the yaml that you're creating in the end
again, not related to decluttering card but yaml
With "entity:" then inside the list. So the variable would be in "series"
Well, next time ๐
I don't follow the lingo you're using
if you're referring to the series yaml field for apex card, that expects a list of dictionaries
series: [[entities]]
with entities being a list
['entity: sensor1,'entity: sensor2']
But somehow also the correct indentation because entity is indented under series
๐