#frontend-archived
1 messages · Page 198 of 1
That looks promising. I've never used it, so can't give any tips.
I will look into it
im digging some more in to this now, the current sensor value is 1,16ppm. So in my card config it should get a red color. That doesn't happen. Is this card incompatible with decimals?
THX! its perfect 🙂
can you have "conditional lines" in a enteties card, like you can have in a grid card?
How do I apply card_mod to a vertical stack? Do you have to make a query selector or am I just missing something very simple?
I've been using a mod-card this whole time but I finally opened Chrome's console and it's been yelling at me to not do that lol
where is it possible to define icon color based on state? is that in the customization.yaml, or would I have to find a way to inline it in my template?
I've narrowed it down to a div#root element I dont know how to select it though
I cannot for the life of me figure out styling shadow roots and I've been trying for months
@iron timber posted a code wall, it is moved here --> https://paste.ubuntu.com/p/B5BS8c9vpF/
hi - i'm using the browser_mod integration (https://github.com/thomasloven/hass-browser_mod)
my problem is when i use a button with:
'''
tap_action:
action: call-service
service: browser_mod.popup
'''
it pops up in all of my devices. is it possible to pop up only on the device that the button was pressed on?
If deviceID is not specified, the command will be run on ALL connected devices.
action: call-service
service: browser_mod.<command>
service_data:
parameter: value
other_parameter: other value
deviceID:
- device1
- device2```
can i use "- this"?
will it do it?
i prefer not to specify device id per device if possible
hmm doesn't do it...
the idea is to pop up only where it was pressed
is it possible to do?
Have a read of the release notes for Browser-mod v1.3.0 https://github.com/thomasloven/hass-browser_mod/releases/tag/1.3.0
Any one who knows why my light state button dimmer in my custom:config-template-card doesn't change when I press it but does change and work well when I long press it and do it that way?
- type: state-icon
entity: light.eetplaats_dimmer
style:
left: 45%
top: 67%
tap_action:
action: toggle
- platform: mqtt
command_topic: "teletask/dimmer/1/set"
state_topic: "teletask/dimmer/1"
name: eetplaats_dimmer
payload_on: "100"
payload_off: "0"
unique_id: "teletask/dimmer/1"
I believe the default tap_action is a toggle anyway, so remote that part and try again.
If it's still not working, check your logs.
when I do this I go straight to the popup with which I can turn it off and on again, however for a strange reason whenI turn it on and close the popup the icon is still grey but when I alf f5 the page the icon is back in the right state, all my other relays work its just this dimmer causing problems
and when I press another relay that works, the state of the dimmer gets updated back to the right state???? wierd
Hi, my lovelace add card cards aren't loading. Is this a known problem?
No
Hello, I am trying to embed the FIRMS NASA webpage via iFrame for tracking wildfires. However the page doesn’t load. I did see a message when I opened Home Assistant on my desktop Firefox browser that said that website prevented Firefox from displaying it because it was embedded. Any ideas or work arounds? This is a very powerful website that I would really like to display in home assistant.
You can’t load an insecure http:// page in an iframe in a secure https:// page because the browser will reject it. Is that what’s happening?
That’ what it sounds like, but the site is https
Would there be a log in home assistant I could reference for why the page doesn’t display?
Browser console more likely
I’ll have to check when I get back home. Thank you.
@frosty minnow they are setting a header "X-Frame-Options: SAMEORIGIN" which tells the browser to not load the site when embedded
Good catch
Bummer. Thank you for the update. I did end up finding a different site that pulls from the same satellite data and does display.
i just did and used it to make it work - thx! 🙂
Not quite sure if this is considered front-end or not, but is it possible to only show a dashboard for certain users, or is it only possible to hide the tabs on a dashboard?
Currently, no.
is it possible to show a single card as transparent without using any custom cards?
i would like to create a transparent header with a markdown card
That's a shame, thanks though
Is there a way of hiding dashboards which don't have any visible tabs instead?
Fairly new to HA... I have 2 Scripts setup. 1 is a switch: that is wake_on_lan for my Android Smart TV (it won't wake/power on via ABD sadly)... 2 is a Script that powers off the TV via adb command POWER. When I run each script, they both work. How do I create a button that will toggle these 2 scripts and show if it is on or off?
@pallid storm If you can detect whether it’s on or not (ping sensor might do it) you can just use conditionals to hide the link to your script.
Just replace your.tv and script.your_script with the right values.
maybe a stupid question but how do you reorder the dashboards in the sidebar?
Long press on the sidebar title and you can then edit the sidebar (drag and drop).
thx
There's also a button for that in the profile settings now, I think.
Hey guys!
does the custom:text-element support the tap_action?
I want to use this - type: 'custom:text-element' text: My text here tap_action: action: call-service service: input_boolean.turn_off data: {} target: entity_id: input_boolean.yellow in a picture-elements card. It doesn't do anything when I tap it, and I'm not sure if it is because I didn't configure it correctly, or it simply doesn't support the tap_action
Hi. I have a vacuum cleaner with Valetudo on it. With the Valetudo card I can send basic commands to it, that's great. Now I'd like to add a control to select fan speed (1 choice among 5), water grade (1 choice among 4), and which room(s) to go to (multiple choices). Is this card https://community.home-assistant.io/t/lovelace-select-list-card/210085 what I need to use, in combination with an input_select (https://www.home-assistant.io/integrations/input_select/) ?
Thank you.
i'm trying to configure my location in the general settings, but the map is just empty... using network analyzer i can see it tries to access some map tiles but they fail with NS_BINDING_ABORTED, work fine if i manually load the image url in the browser... any ideas? Firefox, Windows 10
I am using Custom: slider button card and was expecting to get a small little square tile like button, but I am just getting long rectangular buttons, similar to how an entity is normally displayed. Is there additional things I need to change to make them smaller squares?
I finally have it working for my Camera Viewer TV. Now I want it to turn on my other TV with the same button (both TVs turn on/off in sync). I tried adding to my power on script adding the second entity, no luck. Do I need to write a script for each TV? If so, how do I create a button to do both TV ON scripts?
@pallid storm you can probably just copy paste your actions as a second step in the power on /off script then update the entity in the second section. Some parts of HA allow you to put multiple entities against a service call, but I’ve always struggled to make it work.
Yeah I tried messing with the scripts and it would turn off 1 TV but not the other
alias: TVs off
sequence:
- service: something.turn_off
target:
entity_id: your.tv - delay:
hours: 0
minutes: 0
seconds: 0
milliseconds: 333 - service: something.turn_off
target:
entity_id: your.other_tv
You don’t really need the delay. Just makes it easier to debug when it happens.
Got it. Thanks!
This should work too:
sequence:
- service: something.turn_off
target:
entity_id:
- your.tv
- your.other_tv
Where do I put that sequence code?
I see it. Now it only works sometimes.. usually 1 on, other off.
I probably need a ping sensor to determine the state of each TV ?
@versed kettle posted a code wall, it is moved here --> https://paste.ubuntu.com/p/95ZCfvfw37/
When I use this code for the slider entity it makes it square, but its MASSIVE and takes up have my screen. Could this be a bug? I can't upload a picture to explain really.
Hey everyone, after updating to the latest version my entity cards have strange spacing and do not fill up the entire card. I know I needed to fix my reverse proxy but not sure if I missed an update about changes to these?
is there a way to hide certain entries from showing up in the logbook?
Temperature Outside has been triggered by state of sensor.outside_home_thermometer_temperature
I just want to hide that state only
https://i.imgur.com/mjsaQhR.png see what I mean about a massive square. How is this compact lol?
That is working as expected. Set force_square: false and compact: true if you are using the full column width.
Any one have an issue with Lovelace Map default zoom? Mine has stopped working, even if I try zoom in or out. 😩
I've put this in config:
logbook:
exclude:
entities:
- sensor.outside_home_thermometer_temperature
But I am still seeing this in logbook:
Temperature Outside has been triggered by state of sensor.outside_home_thermometer_temperature
That's a log of an automation, not a sensor. It was just triggered by the sensor.
sensors are excluded from the logbook by default.
ohh I see
I made a broadlink switch. How can I change the entity to use "normal" on-off slider for that switch on Lovelace? Now it is showing two bolt symbols off and on side by side? I tried to add/change device_class both switch and socket in the customize.yaml, but that changed nothing.
Switches don't have device classes. You want optimistic: true, note however that the state of this switch will get out of sync with the device if it is switched by something outside Home Assistant (e.g. a physical remote control). You need a value_template if you want to avoid this.
Thanks. Should it work with platform: broadlink? Might be wrong indenting (tried many) but it always says something like Invalid config for [switch.broadlink]: [optimistic] is an invalid option for [switch.broadlink]. Check: switch.broadlink->optimistic. (See ?, line ?). And still, in the switch documentation it says: The way these switches are displayed in the frontend can be modified in the customize section. The following device classes are supported for switches: None, outlet and switch?
assumed_state: false seems to do what I want, of course it may be wrong if changed without knowing by HA
hi guys, quick question: why is there no thumbnail for local media pictures available? my pictures are .jpg
i cannot send a picture, strange
Hi. Can the clickable area/radius of elements in a picture elements card be modified?
Can anyone help me figure out why the frontend takes so long to start back up after a restart?
Can see on the console it's ready to go but the actual frontend remains inaccessible for a good few minutes after reboot.
What device are you running HA on?
Intel NUC, 7th gen i5, 8GB RAM, 128GB SSD
Does the same thing happen in multiple browsers or from multiple devices?
Afternoon all, I've searched high & low for this, but can anybody simply tell me how to add an item back to the sidebar if it's been hidden/removed? Specifically, I hid History and Logbook when I first installed, but now realise they would be really useful. Many thanks
Long press the sidebar header. The hidden things should appear further down the list.
Thanks for the reply but only items currently in the sidebar appear, with the X next to them to remove them, but no apparent way to add things back
Yeah happens on desktop via browser and via app as well using external and internal url
Also can't access via IP so not just a DNS resolver issue while it reboots
If you hid them via some other, unofficial means, you'll have to figure out how to reverse that.
If I'm honest, I can't remember the process I used to hde them, however I don't think it would have been anything tricky as it was a few months ago after first install, so i was quite new to HA & not hacking files or anything
The method mono describes does work perfectly but only for items currently in the sidebar, can turn them on and off just fine
so im brand new to home assistant, is it possible to make a button on the UI that when you tap it, it turns on a set of lights and when you tap it again, it turns them off?
OK, so I'm an idiot, but just for the benefit of anyone else who experiences this rather obscure problem, it wasn't actually a sidebar issue at all, it stems back to moving over to MariaDb this morning and mis-typing the MariaDb password into configuration.yaml - This effectively stopped the recorder integration from loading and thus the history and logbook integrations which rely on that. Without the integrations running, the items disappeared from the sidebar (as I might have expected if I thought it through and made the link between what had disappeared). Fixing the MariaDb pw meant everything came back just fine. Thanks for the help
Absolutely. You want to look into creating a light group and then use that new entity on the button.
thanks
greetings. I'm attempting to set a default dashboard for each user (not device). I know currently home assistant does not support this. Is there any place where homeassistant keeps record of the "default URL" for the device? I tried to look in .storage but no luck
Is there any way to create light groups within the UI?
Hi.
Yesterday I got an update from 2021.5.3 to 2021.7.3. Now I can no longer access the web interface. The services and the entire automation continue to work, only the web interface is not accessible to me. It says that the connection cannot be established.
I also use let's encrypt and Cloudflare.
Can someone help me with my problem?
What do the logs say?
How can I view the logs? I can't connect via SSH either.
Could you connect via SSH before?
I have never tested this. I didn't use it.
What installation type do you use?
Not sure which install you're using? If you have system_health enabled you can check Configuration -> Info -> Installation Type, or see the following.
-
If you bought the Home Assistant Blue, flashed an image, or booted a VM with an image you're using #330990055533576204
-
If you installed Linux and then ran a script to install HA and have add-ons then you have #330944238910963714
-
If you're running
dockercommands or use a Docker manager and have no add-ons or Supervisor then you have #449717345808547842 -
Finally, if you use
pipto install or upgrade you have #551864459891703809
Having difficulty chosing an install method? See this summary for guidance.
Installed on a RasperryPi 4
That doesn't answer the question.
Read the bot message. Which of the four methods did you use? Head to the relevant channel and ask for help getting to your logs.
The first option. Ok thx i will write in other channel
Has anybody combined auto-entities with button-card?
Trying to get some buttons that only show up when things are on, and can't seem to get it working. Just wondering if this is a path that has been walked before 😛
You need to add layout-card to the mix.
There's some examples at the bottom of the layout-card readme.
Or in the auto-entities wiki
Have done some searching and come up with things close, but not quite:
Looking to use the gauge card (or something similar) and use the value from another entity as the max value.
Hi, its possible to add bulb color weel to lovelace as a grid card?
Hi there, I have a question about home-assistant. I would like to open a url in the background. I already figured out that if is use a button with a URL attached it will open a new chrome window. Can someone tell me how i can do exactly the same thing but without opening a new window?
Something like this?
You create a rest command, which creates a service that'll call a particular endpoint
And then you can create a button that runs that service
Greetings...any easy way to restore the default dashboard. I entered edit mode on my mobile thinking it would only affect mobile views and it killed the main dash
Okay i will search on internet for that. Thank you
Just make a new dash and let it default to being managed by Lovelace.
thanks ...will give that a go I was quite surprised when the mobile view vanished and even more surprised when the local view went with it
How do you make a rest command?
well, before you get into that, what're you trying to accomplish with loading a URL in the background?
just so that we know if this is the right solution
Turning a esp on pinout on and off. And yes i know you can use esphome but i would like to use the url method]
can you give me an example of what such a URL would look like?
something like "http://192.1.1.1/true"
If you load that url the esp pinout will go high
Its working fine with a button and a URL attached but that will open a new window. Thats not what i want
so in your configuration.yaml, you would have something like:
rest_comand:
turn_this_thing_on:
url: "http://192.168.1.1/true"
reload HA, and there should be a new service something along the lines of rest_command.turn_this_thing_on. Create a button and configure it to call that service
Okay thanks, i just started and im noob in HA yet. So where can i find the configuration.yaml
yeah the vs code addon is probably the easiest option for you
have you restarted HA?
Yes
Oh, I made a typo, it's rest_command, not rest_comand
If you copy and pasted what I wrote
awesome 🙂 and no problem
Loving the new colours in 2021.7, but, has anyone else seen the move/edit card buttons vanish from lovelace?
I can click on "Edit Dashboard" but then the edit/move that used to be beneath each card has vanished....
If anything's funky in the frontend, the first thing to try should be a Ctrl+F5 to do a cacheless refresh.
The shortcut may vary on other OS's, that's the common one on Windows.
Tried opening devtools so I can do the "empty cache and hard reset"
Just about to try clearing localstorage 'n' all
No Dice :(
Are you using layout mod?
With a non default layout
Layout mod is broken in 2021.7
Ahhhh
That'll be it
I use the "Horizontal" layout, because figuing out how to correctly order the default layout was making me mad :p
One workaround is to create a new view when you want to edit
And then delete the view once you're done
Looks like it's been reported 🤞 there's a fix, https://github.com/thomasloven/lovelace-layout-card/issues/153
Fortunately there's no immediate need for myself, was just trying to see which entity was broken (an ID changed, which broke something), so used the YAML view instead 🤷♂️
Good catch @zealous pier
i'm trying to get my dashboard on a google home hub, but it just says not connected
What have you tried? What is 'it'?
so, i've just set up and got my HA working with https
and now i want to make a script to cast the dashboard to a google home device
So... what have you tried?
i've tried cast.home-assistant.io
and that works fine, but i want to get a easier way to cast it
Did you follow the link Tinkerer shared with you earlier?
i did
got a step further...
i'm now connected with the hub, but it says Error: Unable to find a view with pat ...
path ...
That's the full error?
yes
.share your code for that attempt.
Please use https://paste.ubuntu.com/ to share code or logs. Please don't use Pastebin, since it can randomly add spaces to the main view.
well, after path it shows the name of the page it can't find
🤦♂️
So it's not the full error?
We can't help you if you don't share all relevant information when asked.
https://paste.ubuntu.com/p/n7PHxgdDnZ/
the google home nest shows this:
Connected
Error: Unable to find a view with path Living
Copy the URL for the page you're trying to cast. Change the domain so no-one here knows it.
https://#####.duckdns.org/lovelace/Startscherm like this?
Yes. Is that the page you're trying to cast?
yes
🤔 It doesn't say 'Living'...
https://####.duckdns.org/lovelace/living
The view you're trying to access is called Startscherm
i first want to get it working, and then make a page specifically for the Home hub
Well you'll get it working by providing a valid dashboard and view name.
these dashboards "Living" and "Startscherm" are currently used dashboards
is it possible the casting to a google home device sometimes works?
Does anyone know of an alarm clock card for the frontend?
I found this one but its ugly and hasnt been updated since 2018
i've managed to get home assistant to work on a google home hub, but sometimes it works and sometimes it gives a error message... (Error: Unable to find a view with path ...) what can i do to fix this?
Hi! I'm trying to make the opacity of an image in the Picture Card change according with the brightness of a light. I'm having problems with it that I described here:
https://community.home-assistant.io/t/dynamic-picture-elements-image-opacity/323159
Can anyone help me with that? Thanks
Hi all ... I am very new to Home assistant and I made a mistake to take control of UI instead of using the default ... there is anyway I can go back to the initial configuration dashboard ? anyone help please ?
There is anyway I can reset back to the original lovelace Dashboard?
Yes. You can also create a new dashboard you can work on manually, while leaving the auto generated dashboard alone.
-> Edit Dashboard
-> {} Raw...
Select everything, delete it, Save
yes but is overwhelming for me
but that's like 1, 2, 3
Honestly, this is one of the simpler things you can do with HA. If following those three steps is too much you probably want to set up a VM with HA that you can snapshot and experiment with
Is there a tutorial I can follow ?
to do what you're asking, you literally click the first thing, click the second thing, select everything, delete it, and save
what part is confusing?
my page is impty
Hi, I'm using Webpage Card for meteo radar. Is there a way how to make it full screen when I tap on it?
Hi! I recently migrated from the legacy Zwave implementation to Z-Wave JS installed through the supervisor. I have it working well now with one exception. When it created the entity for a door/window sensor, the icon is a door. It reflects the state, switching icons between closed and open. How is this done at the entity level? I have only seen a way to override with a static icon in the customizations. Thanks!
Ah yes! I've used this when creating template sensors. Is there any way to change the device class of an integration-supplied binary sensor entity or do I need to create a new template binary sensor?
Ah, I think I answered my own question. It looks like this can be done in customize.yaml
Thanks!
And...done. Thanks again for patience in answering my silly questions everyone. It's greatly appreciated!
We've seen worse 😄
how do I make a card background transparent?
why do card specific themes not respect light and dark mode even if they have both configured?
With card-mod.
Is there an easy way to change the favicon of my Hass instance?
Yeah I saw thomasloven had an easy method but I can't find his addon anywhere. Guess it's manual install only?
I guess so. I wouldn't say that it disqualifies it as easy.
It's on hacs
Under integrations
Oh is it? I couldn't find it there. Is it called the same name under HACS?
Nevermind, I was looking under frontend
Thanks very much
greetings. I'm looking to create a custom component that simply redirects the default dashboard to a specific dashboard, depending on the user and on the screen size (kinda what custom header used to do). Is there any documentation I can read or resources I can use when creating this? I'm assuming I will have to everything in JS
You want #devs_frontend-archived if you're planning to write something yourself.
is there a button icon that dosn't show state? I need a lovelace button for my switchbot
To include the color
anyone have a good entity naming convention they can recommend?
domain.location_identification
thank you. So you have to manually name each entity or is there some place you put a template so new devices use this naming convention?
You have to rename them manually, but if integrations expose a device, you can rename the device and it will attempt to rename the entities accordingly
it's a bit hit-or-miss, and I just manually rename the entities I care about (and hide the ones I don't)
got it, thank you
Not sure if this has been asked/answered before, but can we create a button (preferably custom:button-card) that navigates ‘back’ in history?
Couldn’t find a path in inspector, but would guess maybe browser-mod to accomplish this?
What is 'back' in this context? It feels like the only use case would be for 'nested' menus, in which case you should know the path of the view you just came from.
when using picture_glance card is it possible to replace the
"default image" with something else(loading animation for example) when image is not accessible? https://imgur.com/aIoNhQS
where in hass can I change a device ID so that it applies to all entities associated with that device?
if these are mqtt devices do I change it in that config?
I have an andriodtv integration. I learned each sendevent to allow for faster input via an adb_command.
Is there a way to integrate those sendevents into a lovelace player card, so instead of the playercard sending "play_pause", it sends the sendevent data?
Pulling my hair out trying to get logins working. My current setup has HA SSL done via Nginx Proxy Manager and all web front end through it. Works fine on my LAN (192.168.0.0/20). Trying to access my HA server remotely. I have an OpenVPN server that is I use and it NATs out a 172. address. If I try to access HA once connected to VPN, I get the login screen and then "Unable to connect to Home Assistant". If I take VPN out of the equation and try connecting through my firewall to Nginx Proxy Manager I get the same thing. Logins only work on my LAN. Troubleshooting pointed me to put use_x_forwarded_for: true and trusted_proxies with the proxy ip in the http section (with a matching X-Forwarded-For on the proxy conf), which I've done, and still have the issue. Unsure where to go next. Any advice?
@flint orbit try the ip address of ha instance, not the hostname (hassio.local).
clear cache on connecting device as well.
When I am connected to my VPN, I can access ha via http://192.168.10.50:8123
obviously not punching a firewall hole to test that off VPN
You don’t really need SSL when you’re on the VPN
and after this you get the "unable to connect to home assistant" message?
no. if I access via IP, everything works properly (without HTTPS). If I go through my Proxy I get that error message and ha gives me a notification "Login attempt or request with invalid authentication from XX.XX.XX.XX" where XX is the real WAN ip of the remote device
yes, but I'd prefer it, especially via my domain name I've given it so connection configs are consistent across devices on and off LAN
I can’t connect through my domain with SSL when I’m connected through WireGuard, but I don’t know exactly what the problem is
I'm not familiar with how the proxy works, so this might be wrong, but can you resolve local hostnames through your vpn? if not, that could be a problem.
Just noticing it because I’ve never needed to do it
yes, resolving works fine. And even on my LAN, traffic is flowing through the proxy as my domain name points to the proxy ip.
unfortunately I don't know anymore to help you.
I tried setting up the proxy via the companion app document, but did not succeed.
https://companion.home-assistant.io/docs/troubleshooting/networking#addendum-reverse-proxy-via-nginx
@flint orbit i have this in my configure.yaml ```# https://www.home-assistant.io/integrations/http#use_x_forwarded_for
http:
use_x_forwarded_for: true
trusted_proxies:
- 192.168.200.5
the trusted proxy is the "internal end" von your vpn or whatever you are using
I use a wireguard client add-on
ya, I have those setup. still no dice
restart
and verify if you have x-forwarding enabled on nginx (afaik that's default) - I post my config
ahhh I forgot
for the websocket you need additional foo
server 192.168.200.5:8123;
}
server {
listen 80;
server_name ha.my-super-domain.example;
location / {
proxy_pass http://vpn/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}
--detach \
--restart always \
--name ha.my-super-domain.example \
--env VIRTUAL_HOST=ha.my-super-domain.example \
--env LETSENCRYPT_HOST=ha.my-super-domain.example \
--env LETSENCRYPT_EMAIL="youremail@ha.my-super-domain.example" \
--volume ./ha.my-super-domain.example/vpn.conf:/etc/nginx/conf.d/default.conf \
nginx:latest
``` the is how I fire up my nginx (Root Server + Letsencrypt docker comanion container for the ssl)
I'm using "Nginx Proxy Manager" which is a gui interface to set that up. The sockets being enabled is set in the gui. proxy_set_header Connection $connection_upgrade gives an error. If I leave that line out with have the other two it comes up fine.
I guess either the version or that upgrade thing does the trick - I am no https/websocket expert. I just googled that up.
OK, I got it working, but I'm confused why. I made another entry in my proxy manager. The one not working is ha.mydomain.com and the one working is ha2.mydomain.com. Identical configs. If I was to wager a guess I'd bet the ha server itself is resolving ha.mydomain.com to itself and not the proxy ip.
If it does, it's because your DNS is configured incorrectly (or was, and a bad result is still cached).
yes that's a good reason
Why are reverse proxies so god damn hard to setup?
I've been using nginx to do reverse proxies like so: https://example.cloud/sonarr etc.
And every time I need to add another service like deluge, nextcloud, etc. it's always been a multi day battle just to find the right settings to make it work.
How tf does any network admins get anything done?
Some services just work, were as others like home assistant or grocy require some magically combination of settings that nobody cares to document
Also why tf would you want to use sub domains over suffixes? I don't want to have to create new ssl certs for every service
This rant has been 3 years in the making 🤬
rant notwithstanding, you must use a subdomain for ha (ha.domain.com) and not a path (domain.com/ha)
Okay, taking deep breaths.
So currently I have nginx running in a freenas jail and I manually edit the config files.
It'd be nice if I could move to using the Nginx HA App instead.
Do most people rely on it? Would I be able to mix and match with using sub domains for some services and paths for others?
I would expect so
I wouldn't mind moving to using sub domains if the Nginx HA App allows me to create individual ssl certs in a couple clicks.
it does
if by "HA App" do you mean "NGINX Proxy Manager"?
setting up multiple hosts, some with custom locations, and with whatever SSL certs you want is pretty easy
I want to believe. I'll give it a second try. Last time I gave up after 5 minutes. But if I can work it out it seems like it'd help me a lot.
@flint orbit did you add the trusted proxies to the configuration.yaml?
It makes it super-simple. More questions should go to #general-archived
Thank you
@flint orbit you need this in the configuration.yaml
http:
use_x_forwarded_for: true
trusted_proxies:
- 172.20.0.200 # Add the IP address of the proxy server
Yeah, that’s in there. The proxy is definitely setup correct because when I used a different subdomain it worked. I’m positive I have a hostname conflict in dns I need to cleanup.
Ah
cant figure out how to overwrite the css.
i tried creating a file in /config/www/lovelace/overwrite.css
#brokenImage {
background: rgb(242, 242, 242) url('/local/lovelace/loading.svg') center 36px no-repeat !important;
}
then in configuration.yaml added
lovelace:
mode: yaml
resources:
- url: /local/customs.css?v=0.1
type: css
Im still getting the same old "broken image"
hi, can anybody pls help me out?
so I found out about Config Template Card Card.. but for some reason the img isn't loading
Please don't share images of text.
Please use https://paste.ubuntu.com/ to share code or logs. Please don't use Pastebin, since it can randomly add spaces to the main view.
👍🏾
Sooo I got config-template-card,, got the right piece of code, but for some reason the image isn't loading
Is the case (upper/lower) of the sensor state correct?
What does this return in the developer tools template editor {{state_attr('sensor.sankagrandi_1102', 'game_image_header'}}
the problem apparently lies within the script not translating the code to the link
because doing any other version of this with ints works fine
gives me a string
like it should I guess?
but when inspecting, it just gives me the same I posted here inside the inspector https://paste.ubuntu.com/p/mgKnbc9TnB/
Which template card are you using. There are two.
wdym?
Can you share your full card config rather than just the template.
The template has to be quoted. image: '${IMAGE_URL}'
it get's unquoted after reopening
🤷♂️
You could try asking here https://community.home-assistant.io/t/100-templatable-lovelace-configurations/105241
The dev for the gecko spa custom component has changed the pump entities from switches to fans to accommodate spas with 2-speed pumps. Mine are single-speed. I'm looking for a neat way to continue to toggle the pumps on a picture elements card. I've done this by replacing the switch entities with input_booleans linked to automations that call service the fan presets, but it's really clumsy. I need an on and an off automation for each pump. I guess I could use a template, but that seems just as clumsy. Does anyone have a neater way of toggling two fan presets on lovelace?
hello, I have an issue. I try to add a templated "entity" to my lovelace card. Unfortunately I get an error "Custom element doesn't exist: card-templater". I also tried use "template-entity-row", "config-template-card" but nothing seems to work. I have lovelace mode: yaml, and resources added into configuration.yaml. What could I possibliy did wrong?
I have a shortcut menu bar on every view (context aware, unsing window.location.pathname), with hard coded views to navigate to. Would like to add a Back button to that, so I can easily navigate to the view visited before the current view. Just like the Browser < and > buttons
the back button can not be hard coded because of that. Looking for something like window.location.pathname.previous (which of course doesnt exist)
wait, would this work? history.back(-1) see: https://css-tricks.com/snippets/javascript/go-back-button/ tap_action: action: navigate navigation_path: history.back(-1)
no, doesn't work correctly, simply takes me to my main view because of non existing path....
is it possible to feed the history graph with a dataset (a list of values to use for the graph) or does it always use whatever is in history/recorder?
it would have to be a javascript template and that would only work if history exists. Lastly, you'd have to parse the path because lovelaces path is relative not absolute
thanks, unfortunately I haven't been able to find anything in the JS properties to handle this (yet)... but why would it have to be a template (other than to test for existence)? if history would exist, wouldn't history.back(-1) exactly be the relative command we needed?
nope indeed.... I merely posted that to illustrate what I was looking for
the relative command wouldn't work because the navigation_path will most likely return the full path, not what nagivation_path requries, which is a relative path for lovelace.
Yes now I see what you mean. I need to first use the current view in the form of window.location.pathname.split('/')[2] and then calculate the history.back(-1) to that... if at all possible.
is it possible to have a badge stating the power on a button card ?
like I want to add the power measurement to be displayed on the button in a corner, like a notification
sure check https://community.home-assistant.io/t/lovelace-button-card/65981/5724?u=mariusthvdb and the bottom link there
replace the entity and you're practically set (..)
if you like badges, and do not want them in the top of the view, you can have a look at Thomas's https://github.com/thomasloven/lovelace-badge-card allowing badges in the view, really nice
thanks! I knew i saw it somewhere, but couldn't find it back and wondered if I was dreaming
😄
personally I am exploring the new 'chips' (see: https://material.io/components/chips#input-chips) on which another Thomas posted here https://community.home-assistant.io/t/lovelace-ui-minimalist/322687. they have a more modern look. The badges do have this last bit of HA States look&feel imho
I was checking his code 🙂
but up to now I can't get the label to return the var
[[[ if (entity.state =='ON')
var state = "ON • " + states["sensor.0x54ef441000158b9c_power"].state + "W";
else
var state = "OFF";
return state ; ]]]```
it all seems fine for me
I'm an idiot 😄
forgot to show label 😄
Heya 🙂 , I am running "Home Assistant Supervised" in some docker containers, This has probably been asked before but I cannot find a straightforward answer to it ! I am looking to install a custom resource for Lovelace, and Ive understood I need a www folder for that, I made one under /config/www/ and added the resource folder and files to that, and to the resource section in the Lovelace settings GUI as /local/blabla.js?v=0 but its not loading at all -
Lovelace tells me: Custom element doesn't exist: blabla and if I try to navigate to the http://ip/local folder I get 403 forbidden. Any clues?
Restart HA and clear your browser cache
sorry it works, I was able to reach: http://192.168.xxx:8123/local/text.txt
Ill go do some more investigation
thanks!!
Can the gauge card have a dynamic max range?
I want to have the max update to know how much of my upload bandwith is used but from the accurate value the speed tests generate
I want a card that will turn on a switch. But, when I click it again, instead of toggle between on and off, turn on and then turn on.
Is this possible?
Explain why and maybe we can find something.
NGL but why instead of javascript for custom cards is it not just backed by PHP...?
I have the Broadlink Integration. I learned the command for my AC to turn on, and made a switch in yaml that looks like this:
- platform: broadlink
#host: 192.168.15.22#
mac: 24:dd:a1:b0:03:37
switches:
ac_power:
friendly_name: "AC Power"
command_on: "JgBoAAABIJQSEhMSExI"
When I add a button card to the front end, I have to hit it twice to turn it on, or to turn it off.
Same thing with Alexa, I have to say, "Alexa, turn on the AC" for both on and on (wife hates that)
Hello there! This is my first time on this discord. I have created lighting groups in my Configuration.yaml. I am subscribed to the Nabu Casa Home Assistant Cloud service. When I try to go to Configuration > Google Assistant > Manage Entities > Manage Domains > I cannot see Group domain to toggle On this option. Would anyone know why I am unable to see this Group domain?
Because custom cards run in your browser, and that doesn't parse PHP.
If it would be a backend thing - like PHP is - python would be the obvious choice since that's what all of Home Assistant (except the frontend of course - which is javascript) is written in.
Thirdly; seriously? PHP?
I'm a noobdev just learning java..
and getting into HA..
the only thing I want is: A card that shows a banner based on the discord HACS app's output: which shows what game I'm currently running
What's missing here?
https://paste.ubuntu.com/p/dZHv3Dt4S9/
I got "Configuration errors detected:
No type provided."
Based on https://github.com/kalkih/mini-media-player
https://user-images.githubusercontent.com/457678/52081831-800cec80-259b-11e9-9b35-63b23805c879.png
are you putting that in the UI YAML box?
If so, you need to remove the leading "-" from the first line
Thank you. Could save but the result is not the one I expected. I will continue tomorrow. G'night and thanks again.
Is there anyway to easily check the current screen size of a device? If I am using my desktop or iPad I want to use a picture elements card, but a simple list when using my iPhone
perhaps this: https://github.com/thomasloven/hass-browser_mod#entities
width The current width of the browser window in pixels.
height The current height of the browser window in pixels.
Thanks! That actually has a fullyKiosk-sensor to which might fit even better.
I'm sure there's some goodness in there 🙂
You should check out layout-card
And mediaquery
likely a very dumb question, if I click the "person" representing me in HA it shows my location and says I'm "home" but if I click the Map tab, I'm not on it
How do I add myself?
I believe that you do show up at home on a map card: https://www.home-assistant.io/lovelace/map/
After one of the latest updates (2021.7) I cannot edit the dashboard. I can press the edit dashboard, but none of the lovelace cards have an edit button. Also the +card bottom right corner button is replaced with a simple +. Anyone experienced this ?
a workaround for now is to create a new view when you want to edit
that'll bring things back to normal, then you can delete the new view when you're done editing
Nahhh I do not like workarounds like these. Without a clean solution maybe I should just roll back until it is fixed in any next update. It is good to know though. 🙂
Hey guys, so im trying to use a text helper to make an alarm clock but I want the PM part to be static, and be after the number. Is there any way to do this?
Why are you not using an input_datetime?
If your profile is set to 24hour time.
Is there a notepad or excel-style spreadsheet editor that allows me to write text directly on the ui
Yes, input_datetimes are restored.
Like a noticeboard card?
Can anyone help me? I'm trying to use a picture elements card with icons to toggle pumps. The pumps are actually fan entities in the component, but mine are only on/off. The presets are for on 'HI' and for off 'OFF'
https://pastebin.com/u8yUmHgd
This code returns an error "Failed to call service fan/set_preset_mode. sequence item 0: expected str instance, Optional found."
Yeah
Thanks
Hi team, I've got an issue creating a script. Entities for my Daikin AC Zones don't show up under Call Service, why might that be? They show up in the dashboard fine, and can be controlled via voice etc.
Here's my zones https://imgur.com/a/ZhwYC93, and here's their entities https://imgur.com/a/NDUYkeO, yet in the script under Call Service, it's not listed there... only these ones are https://imgur.com/a/uui5xJz, and they don't show in the list https://imgur.com/a/9Uq5B8V.
Hi! I have 2 sensors on same hardware. Both working fine except History. (https://imgur.com/a/4BXRi4Y) On Temp_In, I got a large history (every 5 sec) and on Temp_Out, I had partial history (every 3 to 6 hours). The current value Temp_Out change every 5 seconds (working fine).
Hello. I'm building a custom light card based on custom:button-card. I want to colour the icons based on the RGB value of the light point. How can I easily catch this value ?
hi. where can i change the icon and title of the default overview dashboard, if it's in yaml mode?
I have build a template but I want to change the primary icon. Somehow it doesn't want to work like other variables. Any idea why ?
Is it a list? What is your card config and the attribute?
I'm having some weird glitchy frontend behavior and I'm not really sure how to debug it. In particular, accessing the file editor or the terminal integrations gives a 401: unauthorized but I'm unsure of why.
But other stuff works - I don't have issues adding new add-ons, or navigating dashboards.
Curious if anyone has any recommendations for a secured switch? Basically I need to limit who can call a switch in HA either by user or by interface. (For example, a keypad interface with a scure code or a switch limited to logged-in user?
Can I make action: url open in a new tab?
@eternal elbow If simply hiding/displaying a card based on the logged-in user is enough, then you can use the custom state-switch card: https://github.com/thomasloven/lovelace-state-switch
but as mentioned earlier, anything can be overridden in dev tools
Not a big fan of security by obscurity but the risk terribly unlikely. This switch safeguards a location where I keep firearms so it's more for the future as my kids eventually get access to more automations in the house.
I'll check that out, thanks.
if you want something to be truly secure, don't automate it
there really isn't much of that sort of hardening built into HA
Oh agreed but I've decided on electronic controls (built it myself) so I'm thinking a few years down the road. For example, I'm away from the house, something happens and I have to remotely unlock that location for someone to access.
you could build your own RPi-based server that takes a token via REST, or something like that
Yeah, current access is fingerprint based and managed with an esp32. Leaves me the option to make an "interface" out of anything I want.
I just can't allow HA to be that interface unless I can come up with a way to ensure it wasn't easily abused.
for something like that, I would just keep it separate
too easy to send an "all on" or similar that would trigger it
or just keep a silicone fingerprint nearby
haha. Oh boy. Yeah nope. I'd be more likely to create an alexa OTP interface where I could give someone the command word.
Is this #frontend-archived channel the place to discuss lovelace?
Indeed:
Discussion regarding the UI and configuration (https://www.home-assistant.io/lovelace).
Thank you @dark dirge Turns out I believe I answered my own question....
I made a card using the templates / gui, chose the "Picture Glance" and set four entities to my 4 temp sensors. But the reuslt is just 4 thermometer icons, whereas i was expecting actual temp in numeric value. I tried copying the code from other cards that do show numeric value, but nothing is working
I looked at the entities documentation but don't know what I'm looking for to change it to showing numeric
I think it's type: state-labels but when I put taht in i get errors
I guess that template doesn't allow that formatting
I don't use the picture-glance card, but this seems promising: https://www.home-assistant.io/lovelace/picture-glance/#show_state
Hi anyone here ?
Nope. I'm not.
i can tell you aren't :p
im looking to make a card as panel fit the screen size instead of being bigger forcing me to scroll down
tried the card-mod with no success
let's try that
same as non panel card
huge margin left and right
nope still centered or bigger 😦
Got a screenshot?
i manage to almost did it
can't post picture in this channel
😮
if i enlarge the graph, the height also goes up
@narrow falcon posted a code wall, it is moved here --> https://paste.ubuntu.com/p/KtH8VmVFYs/
code wall lol, like 10 lines
20...
@narrow falcon Rule #6: Spam will not be tolerated, including but not limited to: self-promotion, flooding, text walls (longer than 15 lines) and unapproved bots.
Please take the time now to review all of the rules and references in #rules.
For sharing code or logs use https://paste.ubuntu.com/.
The bot doesn't know or care what's code and what's text. Anyway... walls of text are annoying, especially for mobile users.
i though the code could help someone else, i thought it was kinda the point of this discord but fine
as i said, won't do it again
Sharing is great, and I appreciate that you'd like to help others through your solutions. We just ask that you use the proper tools for sharing larger snippets.
right, it just took me off guard
Hello everyone!
I am trying to create a floorplan with WLED item and I cannot apply a filter CSS option for changing the light color on the floorplan.
Here is my image item: https://pastebin.com/4VcHn6SD
I've also tryied to use the following for the filter setting: https://pastebin.com/9kj31rw3 (I checked it on the developer-tools/template page and it returns the following result: hue-rotate(37.647deg)
Anyway, there is no filter css attribute in the result at all.
But it works fine if I set up this option manually, eg filter: hue-rotate(45deg)
Can anyone suggest me anything or tell me what I am doing wrong?
Picture-entities doesn’t support any templating.
Card-mod may help you. I’m on mobile so can’t link you, but there’s a thread in the forum with some great tutorials linked from the top post.
Thank you. I didn't know this
Of the core cards only markdown does support any templates. And that’s jinja3, not javascript.
There are some custom cards that can add that functionality to the core ones, though.
It seems like I got this idea from one of such custom cards usage examples
Are there any other beautiful thermostat cards except for the default one and simple-thermostat?
so my home assistant doesn't connect anymore from outside my network, I'm guessing from the breaking change with http reverse proxies. I've added
use_x_forwarded_for: true
trusted_proxies:
- 172.30.33.0/24
and reloaded nginx but still no dice
no need to guess. what do the logs say?
A request from a reverse proxy was received from 172.30.33.8, but your HTTP integration is not set-up for reverse proxies
but 172.30.33.0/24 should cover 172.30.33.8
in the configuration for the nginx addon
well, that's not right
oh, I have to put it in my configuration.yaml, I see
If you are using a reverse proxy, please make sure you have configured use_x_forwarded_for and trusted_proxies in your HTTP integration configuration.
For more information, see the HTTP integration documentation.
and specifically under http:
it's been so long since I had an http: section in my configuration.yaml I didn't even think of going there even as I was reading the config. Also I normally deal with use_x_forwarded_for within nginx so my mind probably juts went there. thanks
Please keep bot spam to #botspam
anyone have experience with spotcast? I added the secret key to my configuration.yaml but it errors when rebooting home assistant that the secret is not defined
p_dc: !secret sp_dc
my bad, i thought i needed !secret in there..
Morning guys i just updates this morning i read through whagt breaks section but cannot find anthing that would explain why several cards no longer disply please could somebody help me ? Also checked logs nothing there either
Which custom cards are you using?
Your link requires a login. Use a proper image sharing tool like imgur...
That isn't the only one you're using.
i have mini graph card
Climate thermostat card
I have an intergration called Garbage Collection
The card says Configuration errors detected:
Custom element not found: button-card
If you're sure it's installed, do Ctrl+F5 in your browser to flush the cache. If that doesn't work, follow the steps to install the card again.
cheers fixed
Hey HomeAssisters. I have been playing with RomRider's excellent Button-card. It is so customisable that you can knock up a fantastic looking card in no time. One can associate a bunch of actions with the entity itself, but my question is as follows: Is it possible to create actions (such as tap_action) associated with the custom fields you display in the grid? A use case could be displaying a small icon somewhere in the card that, if clicked, could call a script or toggle some other relay. So one would be able to do different things depending on what you click in the card.
Anyone know of a way to get the lovelace edit buttons to show up without clicking around and reloading till it works? anyone else seeing this?
@stuck trellis i dont see anything related to that in the grid card documentation. so i would guess no. if you mean within the grid card, doesnt seem that way, anyway. the grid card width itself would be lovelace related and you could use something like vertical or horizontal cards with that within those to help control. but natively i dont think there is an easy way. im no expert though
im having an issue where i cant access lovelace unless i open a new browser or a private window. the app works, the new private window works, but refreshing and retrying on the browser tab i previously had open, and even opening a new tab (not private) will not connect. anyone else have this issue?
Sounds like a caching issue. Unlikely to be HA itself that's to blame, more likely your browser.
well its happening on multiple machines
wondering if memcache or something is in the middle
but i do agree its cache issue... just not sure how to resolve as its an issue which just keeps coming back
not altogether aggrevating except when it happens on the wall mount tablet
Do you use any lovelace plugins at all? If so, try removing them and clear your cache.
Also check your browser console for any errors
I had written a template code for this... But when the sensor value always shows unknown can someone please help me?
- sensor:
- name: "Soil Moisture"
icon: mdi:water-percent
unit_of_measurement: "%"
state: >
{% if is_state('sensor.soil_moisture','true') >= 100 %}
100
{% elif is_state('sensor.soil_moisture', 'true') < 100 %}
{{ states('sensor.soil_moisture') }}
{% endif %}```
states(‘sensor.soil_moisture’)|float < 100
What should be writen in the else section?
I want the sensor value to return if the moisture is less than 100
yes...so what should be written there?
What do you want there?
It’s fine
becoz I m unable to get the sensor value using that
If it works in
-> templates, it will work there
Your tests were completely wrong, so all bets are off for the version you posted
100
{% elif states('sensor.soil_moisture')|float < 100 %}
{{ states('sensor.soil_moisture') }}
{% endif %}```
This still shows unknown
@dark dirge Please help me
in the else section I want the sensor value to return if the moisture is less than 100
Change all of {% elif …%} to just {% else %}
100
{% else %}
{{ states('sensor.soil_moisture') }}
{% endif %}```
I tried but still, it shows unknown
Someone please help me
Your question is still on screen. Be patient.
ok thankyou
Your source sensor is incorrect. You are referencing the template sensor entity id. Also if you just want to limit the value to 0-100% try this: https://paste.ubuntu.com/p/37VrrnW7BG/
Thankyou..I tried it
Now the sensor status changed to unavilable
But I can see its values on my serial monior
Share your template sensor config
- sensor:
- name: "Soil Moisture"
icon: mdi:water-percent
unit_of_measurement: "%"
state: "{{ ( [0, state('sensor.soil_moisture'), 100]|sort )[1] }}"
```
This is probably not your soil moisture entity id sensor.soil_moisture. What does this return in the Developer Tools / Template Editor {{ states('sensor.soil_moisture') }} ?
returns soil moisture percent which was greater than 100
Yeah I stuffed up the template. It should be state: "{{ ( [0, state('sensor.soil_moisture')|float, 100]|sort )[1] }}"
This was shown after I had removed my templete
With the template, It shows unavailable
Read the message just above yours.
Yes I tried it..Still it shows unavailable
Did you reload / restart? Because it works here. https://i.imgur.com/6HdBKKS.png
Yes restarted hassio from server control tab
Also your template sensor has the same name as your sensor. So you should probably be looking at sensor.soil_moisture_2 in Lovelace or Developer Tools / States.
found the error inside of the braces it's states
Its working...But currently my sensor shows up the reading of 128
Hassio should be howing 100 according to the template..But its showing 0.0
What does the template editor show for: "{{ ( [0, states('sensor.soil_moisture')|float, 100]|sort )[1] }}"
0.0
And what about {{ states('sensor.soil_moisture') }} ?
Also you probably have to wait for sensor.soil_moisture to update.
Try it without the spelling mistake
can't we change it to sync with the sensor
Try this in the editor {{ states('sensor.soil_moisture') }}
this shows 0
Then your template sensor is correct
No spelling mistake..It's correct
Your sensor is reading 0 so the template returns 0
No but actually my sensor is currently on reading 128
Then you have the wrong entity id in your template
entity id is correct...I had checked it
This {{ states('sensor.soil_moisture') }} should return 128 if it was the right entity id
entity ID is correct..I m assuring u
Screenshot the the line in developer tools states where you are reading 128
and share it via imgur
not the developer tools..But I had setup an Open MQTT of the same sensor without templete
It shows 128
Yeah, but no. Go to Developer Tools / States and see what Home assistant thinks the value is.
Lower down in the list. What is the value?
0
There's your problem. Home Assistant is not reading your soil moisture sensor.
BTW, none of this belongs in #frontend-archived . For help with templates #templates-archived , for help with your sensor #integrations-archived
question I am looking at templates like above and maybe not getting it, but trying to get this card to show motion vs no motion in the card. I tested this in the template developer and it works, but unsure how to change the value in the card. as 8 and 0 are not really helpful to humans.
`type: entities
title: Default
entities:
- sensor.upstairs_multisensor_burglar_3
template: - sensor:
- name: "upstairs"
state: "{% if is_state('sensor.upstairs_multisensor_burglar_3', '8')%} Motion {% else
%} No Motion {% endif %}"`
- name: "upstairs"
i have tried to add the entity sensor by name sensor.upstairs and didn't really get anywhere.. but probably doing this wrong.
You’re confusing a template sensor with a card
Unless those are really two separate things that you just pasted together
I guess i was looking at it as dynamic template within the card that would be able to template the state
That’s not a thing with that card
since template: was valid input to the card
Valid how? Just because it allowed you to include it in your YAML, doesn't mean it's accepted or valid. Most cards (with the exception of markdown card and custom cards) don't accept templates.
I mean is parsed it fine figured it would say type error or something if not.
But yes seems like just doing simple yaml validation.
Solved Thanks
Anyone know how to achieve something like this in home assistant? https://camo.githubusercontent.com/76fbac6dee7d0a9e631a32704a1286644ca04fc765fa5351835808a7895da85f/68747470733a2f2f692e696d6775722e636f6d2f3277474c664c702e706e67
You could do it with the custom button card.
Can anyone tell me how to fix this? It happened to all my entity cards basically...
Update template-entity-row
Is that in HACS?
Yes. Do you have it installed?
Yes sir
Then that’s the cause
Also, for some reason lots of people have it in their configuration twice. If hacs doesn’t have an update for you, make sure you only have the hacs version in your lovelace resource list.
/hacsfiles/lovelace-template-entity-row/template-entity-row.js this correct?
But I did have a weird HACS issue a month or so ago. I wonder if that is what broke it
Thank you @polar kelp !! That fixed it. You rock!
Can you elaborate?
There are some examples lower down in this forum topic. https://community.home-assistant.io/t/lovelace-button-card/65981/1
…well, I also caused it… but thanks
Creating my very first Lovelace Custom Card and want to include an input field for setting date & time. Any example I could look at to find how to configure the html input in correct way?
You want #devs_frontend-archived if you're writing the code for your own cards.
hello , when i have in developer tools state attributes, how can i change some of them , to do my tests
Type in the box, click 'set state'.
source: YouTube
like this ?
source_list:
- HBO GO
- Live TV
- Netflix
- Plex
- YouTube
volume_level: 0.04
is_volume_muted: false
source: Plex
sound_output: external_optical
friendly_name: LG LivingRoom
entity_picture: >-
/api/media_player_proxy/media_player.lg_livingroom?token=ef0b72d31eeb3bc5bd0e9ec44cb591b8916e6570843e79382e6b4dbc71d71924&cache=aaac57434b8c48b2
supported_features: 20413
device_class: tv
okay. sorry
but this not work. Just source: YouTube and cilck set state
not change the state
You said you wanted to change the attributes. If you want to change the state, it's the smaller box above.
is there any way to to make an entites card with a placeholder defined by an array? I want a custom:multiple-entity-row card from ~10 sensors. only part that changes is the entity name and this would result in a large block of code...
example for 2 sensors: https://paste.ubuntu.com/p/NcRfMbb2Hh/
ah and the name: changes aswell...
and another thing: when setting up a customize: section inside a package for friendly_name this should overwrite the friendly_name set by the integration right?
Yes
Maybe auto-entities can do what you want https://github.com/thomasloven/lovelace-auto-entities/wiki/Template-filters
hm strange friendly_name does not change here
homeassistant: customize: switch.docker_grafana: friendly_name: "Grafana" icon: mdi:chart-areaspline
but the name is still "grafana"
@polar kelp thanks, will look at it
Hi, I cant see the "supervisor" menu on the left.. I have admin user I suppose. Should it still be there? (I installed HA from snap)
That’s not a recommended way to install Home Assistant, and it’s very unlikely to give you a supervised install.
okay i see. i was wondering if it was deprecated or my config was wrong but that makes sense, after i read some documentation
oh man
so I'm trying to have a button that on tap goes to a different page, I've added the URL and everything, however it keeps opening a new tab on desktop, and opening browser on mobile. Any reason this would be happening?
what should i use to display HAS on my tablet in a nice way? the app, or is there something better?
Hi all, I'm playing about with the HACS folding entity row. I have got sliding entity rows with toggle switches and wondering if anyone knows if I can move the drop down arrow on a folding entity to the left of the toggle switch to keep the switches aligned. It's only for aesthetics really not an issue but would be nice if I can do this. Hope that makes some kinda sense, I can't attach files here but can link a photo on imgbb if that's allowed.
Just realised this is more a question in regards to the sliding entity, I'll do some more research in the github, I been looking in the wrong place 😩
Hey guys is it possible to add sensors to android power menu?
#android-archived would know.
Anyone knows how I can use multiple variables in the custom buttoncard integration?
label: |-
[[[ if (entity.state =='running')
var state_uptime = states["sensor.docker_emqx_node1_status"].state;
var test = 'test';
else
var state_uptime = "Down";
return state_uptime ; ]]]```
Apparently it fails on var test, I seem to be able to only set 1 variable there.
I also tried using `&&` and `and`
if I put it in the else statement, it works, but not in the if, so I'm very confused
I just put the same if statement and then it works, not like how it's supposed to be though (I guess)
it's just Javascript in there, so use { } to enclose multiple lines like that
label: |-
[[[ if (entity.state =='running') {
var state_uptime = states["sensor.docker_emqx_node1_status"].state;
var test = 'test';
}
else
var state_uptime = "Down";
return state_uptime ;
]]]
it doesn't give an error, but also doesn't return anything with that
sorry my bad
had a typo
is there a way to get an rgb ring with tap in the center for on/off? basically just the default brightness one but with the brightness replaced with color?
Hi all! Is there known card (possible a gauge?) that will support negative values?
hey, does anyone know for this custom card how I would write the service? I'm trying to just use service: script.clean_livingroom for example but it's not showing up in the dropdown https://github.com/PiotrMachowski/lovelace-xiaomi-vacuum-map-card
Am I doing something wrong?
Is this the right place to ask even?
I remember having it working at one point but I'm not sure exactly what I did
@viral scarab posted a code wall, it is moved here --> https://paste.ubuntu.com/p/7gPMZ8ChCx/
Image of what I'm seeing: https://i.imgur.com/l7NfOAt.jpeg
Hass version?
2021.7.4
You're definitely missing a type: there.
hmm. I copied and modified from the github page, their config only has one type at the top. Where would you put it?
https://github.com/jcwillox/lovelace-paper-buttons-row#embedding-in-other-entity-rows
There's a dropdown for full example.
Just copied the stuff above the divider obviously
Yep. That example is faulty. It should start like all the other ones: ```yaml
type: entities
entities:
- type: custom:paper-buttons-row```
@viral scarab posted a code wall, it is moved here --> https://paste.ubuntu.com/p/hnZpGFQQRk/
well I have no idea what happened, but my original config works now? I added a type: field, which had other errors. I modified it back to my original and it started working again. No clue.
I guess I'm stuck with the card the way it is too because I can't even edit it without it locking me out again.
If you're worried about messing up a dashboard when you make edits, make a separate dashboard for experimenting in.
Try a cache clear.
Cache clear didn't work. I figured out how to recreate the issue though. Type in my original config, select all and type any character (delete doesn't work), ctrl-z to undo and get config back. Accepted with no errors.
and behavior is the same on both firefox and edge (which I never use)
What about with a real browser like Chrome?
Sounds like maybe a quirk of whatever embedded editor the UI uses.
it has many quirks
I have had other quirks (with other cards) like everything I type doesn't move the cursor over and end up with backwards text. Not sure if that's unique to me lol
Is your system using a RTL or LTR language?
That's a weird one
If you have these issues frequently, consider switching to YAML mode and using a real editor (outside of HA)
yeah it's odd. Think I should open an issue with the paper-buttons-row github, or think this is something with the editor HA uses?
The jumpy caret is a known problem with codemirror. We can only hope for an upstream fix.
It's more pronounced in safari I think.
Hi everyone can you check the yaml for my universal remote card
- call: remote.send_command
data:
entity_id: remote.broadlink_ir_rf_kumanda_remote
command: >-
b64:JgBYAAABIZcQFBAVEBUPFREUERQPFhAUERQQFQ8VEBUQOhAUETkQFRA5ERQQOhAUETkRFBAUERQRFBA5ERQRORAVEDkRORA5EQAFbgABIk4QAAw/AAEjTRAADQU=
- call: androidtv.adb_command
data:
entity_id: media_player.mi_box```
I want both services to run but when I add the first call the second call is not working
If you’re taking about this, I see no indication that multiple calls are supported.
You could, on the other hand, call a script and do whatever you want
I have this weird situation where, when I click a light color on a color wheel, the lightbulb flashes that color and immediately goes back to previous color, but If I run a light.turnon service with a specific color, it changes colors fine. This happens with all of my RGBCCT lightbulbs running tasmota (but not RGB devices). This leads me to think it's some weird frontend glitch.
hass: 2021.7.4
mqtt: mosquitto 2.0.11
tasmota: 9.5
Tried a completely default new instance of hass, restarting everything, wiping mqtt's DB, etc, no joy
How can I diagnose Lovelace failing to load entirely? An uncaught exception in a promise yields an "unknown error", and there is no call-stack when this happens. My installation is not usable at the moment, but I can access everything through the command line on the host.
What installation type are you running? Docker? OS? Core?
Start by removing all resources.
And custom integrations that add resources, like dwains theme, browser_mod, fontawesome... stuff that do stuff to the frontend
I'm running a docker install on RPi4 - I don't have any of those custom integrations - I am suspicious of the Belkin WeMo integration, but it's not a custom integration. How would I remove that from the command line (the web UI never loads).
Can I somehow remotely reload the frontend on a tablet home assistant app? Or have it automatically reload it every X minutes/hours?
Does anyone know a panel that looks like the dimmable light panel but is an rgb wheel for rgb lights instead?
On the docker version, all the errors should go to standard error. ‘docker logs xxx’ doesnt show anything?
Do you have hacs for installing custom front end elements?
Yes, use the browser-mod window_reload command, https://github.com/thomasloven/hass-browser_mod
So should I start has via a browser instead of the home assistant app, or will the browser mod use the app as well?
I don't understand your question.
Idk what that means lol
I think the browser_mod applies to the mobile application also.
It is just an integration/component that gets installed into HA
And you can use HACS (which is another integration) to install browser_mod.
so I'm trying to have a button that on tap goes to a different page, I've added the URL and everything, however it keeps opening a new tab on desktop, and opening browser on mobile. Any reason this would be happening?
ah will try that, thank you!
thanks a bunch, will try it out
amazing, ty!
I installed core-2021.7.4 on a pi4 all went fine.. and decided to install the argon.one active cooling addon to manage the fan etc and appears since then I have no Edit anymore, I can click edit dashboard but the edit cards option os gone.. deleted cache trued crhome and firefox and both are the same no edit
it shows exactly the same thing as what's in the home-assistant.log. I've disabled the suspect integration (I think), but the front-end still does not ever load. How do I diagnose what's causing the "unknown error" in the promise?
I would start with a blank hass installation, whether thats container or otherwise, and then make changes one by one, to see which breaks lovelace
The installation was working. Then one day, poof - it stopped. I don’t want to toss all my integrations if I can help it (I have a lot of automations, and find HA/Homekit to be very brittle). Surely there is a way to diagnose this directly?
I don’t know the internal workings enough to answer that. There are probably some other logs somewhere. Best to ask the devs.
I really recommend running hass in an immutable container though. Bake in all the configuration in. Integrations, automations, etc
Then every time you want to make a change, you recreate your container after each change. Then if something breaks, you know what exactly broke it
How can you be sure that this error is the cause of your problem? I too have a similar error in my console.
I will absolutely consider building the container this way once I get it working again.
I can't, but it's the only thing in the javascript console when the web frontend never loads.
Hi, I have the same problem as gootynz. Have a Pi4 / OS and just updated from 2021.6.5 to 2021.7.4. At the first glance all look good except that I can't edit the cards in the UI anymore (there is no edit button below the cards anymore). You can still edit the views but not the cards anymore. I did the same update step in my my test Pi3. I don't have the problem with the Edit button on the Pi3. Also update the supervisor to 2021.6.8 right before. The problem started with the update to 2021.7.4 on the Pi4. Any help is appreciated.
Rainer I just done reimage and did not load the argon script and after getting tasmota and mqtt and some basic switches the problem is back, the entire edit move up down menu is gone and the same problem is 3 different brousers
gootynz, have you done a snapshot before the update and did you try to switch back ? I don't have argon / tasmota.
Rainer I used clean new 1.7.4 image on Pi4 no upgrade I did mange to edit cards first and sure after adding and editing about 10 cards the menu went west.. also the blue add new card buttons is just a + sign
gootynz, so you are saying you had the same problem after a clean image ? The add new card button also is only a + sign in my case. I'm wondering what is different, as did not see this problem on my Pi3
rainer twice re-imaged and same problem both times the first time I thought the argon fan addon caused it but apparently not as second re-image was bare basic to get 3-4 switches working
gootync, when I hear you then I tend to wait for the next version to see if if gets fixed. Until then I might go and use the raw edit mode.
@polar kelp Hey Thomas - With the template-entity-row card, is it possible to allow the state to show as a toggle button instead of static text?
Yes. Since the latest version. It’s in the readme.
thank you
If I disable an entity does it make it so I can't use it anymore or does it just remove it from the overview?
The former
Hello; i am using a subdomain (ha.xxxx.ca) to access my ha frontend and i just enabled cloudflare for my dns and now i am not able to access my ha via the subdomain. It only works via IP.. Wondering if someone can point me in the right direction as to what i need to change.
hey can someone tell me please whats the best way to display the time since a button was pressed. Counting downwards seems to be easier...
Spent almost the entire day trying to rebuild my HA - and at some point during the build of integrations the front end just hangs up (it says "data loading..." and never finishes) - it's a different integration installation every time, but once it hangs, no amount of rebooting or backing out the last change will bring it back until I walk all the way back to a virgin install. what gives? Has there been some change to the thing that makes it so prone to this?
What parts of the ha directory need to be captured? If I try to capture the whole directory, I am unable to login to the new version - probably a permissions issue of some sort on credentials files... maybe?
this seems to have worked under the http section (192.168.2.1 is my router pfsense IP)
use_x_forwarded_for: true
trusted_proxies:
- 192.168.2.1
do i need add all the cloudflare ip subnets (https://www.cloudflare.com/ips-v4) under trusted proxies?
If pfSense is your proxy, no
thanks @dark dirge im sorry; how do i confirm if pfSense is my proxy?
only you would know that
hmm it might be my HAProxy on pf..
got it; i was just worried since i just configured cloudflare to my sub domain of ha.domain.ca and now when i ping my sub domain - i see cloudflare IP (which is good) as before it used to show my ISP IP. But i just assumed i should be adding all the cloudflare IPs into the trusted_proxies
some folks apparently use Cloudfare as their proxy and need to add all those networks, but I don't think that's the case for you
got it! thank you
You mean which directories to make into persistent volumes so that your data persists across container recreations? /config
right, but if I just copy /config off an existing installation, and create a container with it, it wants to go through the first login/create account pathway, as opposed to just letting me login with the credentials I already created for it.
Hm. Shouldnt happen. Are you sure the container is definitely using that volume?
Unless its corrupted in some way (low probability). All the user configuration is definitely in /config
I thought that should be the case, but it's definitely not "just working". The only thing I can figure is permissions of some sort. I'll just keep randomly trying stuff 'til something works.
let me see what my perms look like
If any entity configuration refers to another entity that is not there, the entire front-end fails to load. This is bad
everything is owned byt root:root
@wooden carbon posted a code wall, it is moved here --> https://paste.ubuntu.com/p/K8cJmxgYw9/
@real salmon Your setup sounds immense, I would have started from scratch ages ago 😄
Then again, I only have like 20 tasmota/zigbee devices and my only integrations are mqtt/tasmota/circadian lighting/ZHA/Unifi
Actually, I've got really weird behavior - I think there is a problem in HASS - I have a window that has a loaded lovelace front end. I can restart the server and interact with all my cards, but if I open a new window. It will never finish loading.
Might be inconsequential in your case, but i would always test in a private/incognito browsing mode, this way, nothig gets cached between refreshes
no errors in the logs
it's not a cache problem - just tested across all the browsers, incognito, etc. Go through the login prompt, then... nada
when copying the directory, several files (onboarding) are only readable by root, so you have to copy the directory as root.
Hello. I'd like to create a custom login screen for my installation, i use it for commercial, monitoring of mining rigs and power consumption and some control for my customers over their machines.
Is it possible to change the login screen for something custom (of course reference, like "powered by Home Assistant") would remain intact.
hey all, trying to get tunein radio stations as buttons, I keep getting this as an error though sequence item 0: expected str instance, Optional found when tapping the button
https://paste.ubuntu.com/p/Y3zgwVTYW7/ this is the script code and then the card code i have
Good morning everyone, is there any way to add / modify the spacing surrounding the individual cards of a grid card layout? There seems so be no space at the outer edges , just in between the cards and that somehow looks pretty ugly.
it's under the custom:mini-media-player card
i am unsure on the script code, haven't done much with them, and was just trying off another project I googled to get it started (https://community.home-assistant.io/t/chromecast-radio-with-station-and-player-selection/12732) similar to that
the difference being I just wanted buttons instead of a dropdown as I only have 2 or 3 stations I'd want to select from
Just replace the image? If you’re running hass as a docker container you can do it by setting up a volume, for example:
/some/imageonmypc.jpg:/config/hass/logo.jpg
I'm running the os, but not just changing the image but totally rework some of the pages. Starting from the login screen.
The other are might be possible with some custom components.
Then you’ll need to rewrite the code 🙂
That sounds pretty awesome what you’re doing. Got any screenshots of your dashboards?
No dashboards yet, rewriting the code is not a big deal, but i hope updates does not interfere with it too much, i think i'll dig into the source 😄
I ran a small mining rig hosting service, and building mining rigs for my customers - for a living.
And for those customers who host their rigs at my farm i'd like to give a dashboard where they can see eletricity usage - smart outlets with influxdb - and some basic info.
I even wrote a proxy for better mining effinency that runs in docker now, so they migh configure their proxy through their home assistant dashboards.
Sounds fun.
I am trying to make a navigate action to supervisor dashboard; however it's still just giving me more-info instead;
- type: glance
columns: null
entities:
- entity: sensor.supervisor_updates
icon: 'mdi:download-network'
name: Updates
show_icon: true
show_name: true
show_state: true
title: false
tap_action:
action: navigate
navigation_path: '/hassio/dashboard'
Ah, had to be under entity; I got it. 👍
In Upcoming Media Card:
Is there any way to group a show when you add multiple episodes at once? The show is grouped in Plex, but it will show separate episodes in lovelace.
small question: i have a button and i want it to run a script and open a url, how can i do this?
Buttons can only call one service per action, so you'd have to call a single script that does multiple things.
ok, second question: how do i implement opening a url in a scrip?
Opening a URL where and why?
on the device that activates the script
That answers half the question...
i want to receive a notification if my kids press the button to open the url
so the script handles the notification
Gotcha. I don't think there's an easy way to do that. I'm not aware of a way to make the script aware of which browser made the action, or for it to target that browser.
you can easily setup the button to open the url, no easy way to make a button do 2 things?
As an aside... if this is intended as some way to tell each time your kids access some site, you're aware they can just bookmark it and access it directly the second time, right?
i am aware of that
And if your wish is to monitor, there are better ways to do it (none of which are childproof, since children are sneaky bastards).
Hi everyone. Can someone point me in the right direction? Loading home assistant from certain browsers (e.g. Android Bromite and Bromite WebView) shows the overview for a short amount of time then returns at "Unable to connect to Home Assistant. RETRY". Putting my debugger on there I get a browser error: Could not load content for webpack://home-assistant-frontend/app.62541dd1.js (HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME)
Is this a browser error not properly applying cross site protection of some kind? Not recognising the webpack protocol? Or should home-assistant-frontend actually be a proper namespace including a dot?
There source app.62541dd1.js was loaded successfully from the server before, so I think it's saved in a offline cache and when accessed again over that webpack uri, it breaks.
I'd start by clearing the cache.
Cache was cleared, that's how I reproduce the issue (otherwise I can't get to the login screen again).
Another pointer that I got is: Uncaught (in promise) DOMException: Failed to construct 'WebSocket': Access to this address is not allowed.
Not sure if that's related but that hints at problems with your proxy config.
Mhm, good point!
But Home Assistant is working on the same smartphone using Firefox, same goes for desktop using Chrome/Firefox.
This is someone having the identical issue: https://github.com/bromite/bromite/issues/822
That's strange... and that dev doesn't seem interested in helping 🤦♂️
Mhm you can say that again :p
I'm not sure what to suggest. If it works in other browsers, it's Bromite 🤷♂️
So I wanted to figure out if it's Home Assistant or Bromite (most likely Bromite) and present a proper bug report there.
Yeah the main issue is, my Android uses Bromite WebView, so the Home Assistant app won't work...Maybe I should sacrifice some privacy over usability 😕
Some custom Android ROM (/e/) ships with Bromite as stock webview, they seem to be having the same issue, but they don't seem to realize that it's not their issue/bug: https://community.e.foundation/t/home-assistant-app-cannot-connect-to-hass-server-anymore/30921
Not sure where to post this, but i've recently been getting The 'value_template' option is deprecated, please replace it with 'state_value_template' in my logs. The devices are running Tasmota and are added with the discovery function. Can i re-add them, or do i need to reflash/update my tasmota devices?
So it's a question about the Tasmota #integrations-archived ? You should ask in #integrations-archived
tecnically no, it's the MQTT add-on. But it seems to me that the add-ons section is more for setting up add-ons...
It's not the mqtt addon that has the issue. it's an mqtt light integration. See: https://github.com/home-assistant/core/pull/51589
is there a reason why HA doesn't have a https interface like pretty much every other web based system out there does?
you can configure it to do so
i thought from what i can read you have to use some convoluted reverse proxy
no
create a self-signed cert or use a real domain/cert, such as through Let's Encrpt, as it mentions
i've done the lets encrypt thing already
so just by virtue of adding the SSL cert file location line into the .yaml's 'http' section, will cause it to start only accepting https connections to it from now on?
yes
anyone knows how to disable the legend when using apexchart with multiple entities ? been looking on their github, but can't seem to find it
try adding:
apex_config:
legend:
show: false
thanks
yeah i couldn't find it, even though it makes sense
looking at my header being the same
yeah I had the header already hidden, but some how didn't make the link, to do the same for legend
hello every one, i am having a lovelace card includes a custom fold entity row and i need to acheive 2 things: 1st: this custom fold entity row to toggle the header toggle of the main card 2nd: to have the state color true for it
i can only have 1 of them done, not both together at the same time
it is only 1 row in the card yaml code if i add it then i have 1st feature but the 2nd is not done, and when i delete this row then i lose the 1st feature but i get the 2nd done.
this has a screen shot for what am talking about if some one can help
What the hell happened with the last update that made all the history-graphs have colors with the same hue? I loved the contrast between colors, but now on one instance graphing 3 items, I see light blue, dark blue, and baby blue... Please tell me there's a way to customize the colors because this is really difficult for me to see the difference between the entities now.
A PR to allow changing the graph colours using themes has been submitted: https://github.com/home-assistant/frontend/pull/7804
Does anybody know how to get onclick actions for custom elements (ie not the main entity) in the custom button-card without nesting more cards? The YAML gets a bit busy...
Use templates to tidy it up.
Yah but one of my favourite features of the button-card is you can template anything. When you start nesting other cards, it becomes a bit harder to template and style, so I am nesting button-cards inside button-cards. It works, but it would be nice if there was a way to avoid it (with actions on the elements).
is it possible to have an entity area with both buttons (for lights) and images (for cameras) or do camera stuff have to be in their own separate entities?
You can add any entity type to an area.
I don't get how "Statistic" entities are filtered in the Statistics Graph Card.
Some of my sensors, declared as battery for device_class, don't appear. They are properly recorded in the recorder thought.
Icon and unit_of_measurement (%) are the same. I am unable to use the battery level sensor from the HA companion app as a stat for instance.
I'm trying to mimick someone else's lovelace look, (https://github.com/pqpxo/SWAKES_hassio). He lists that he uses a few different themes in his giant list of everything he uses, including frontend HACS integrations, so I've copied all that. He appears to use the Nord theme for the overall HA theme, but that theme has dashboard cards with square corners, whereas his screenshots show cards with rounded corners. He shows all his yaml files etc., My question is - is it possible to see what he's doing with themes etc from the files in his reposititory? I can't seem to find anything that tells me how he's got themes configured
For example, he's got a custom background image (I think), but I don't see that mentioned in his yaml's
I somehow managed to add an input_select Helper through the front-end, "rtttl song", which is throwing errors on startup:
homeassistant.exceptions.InvalidStateError: Invalid state encountered for entity ID: input_select.rtttl_song. State max length is 255 characters.
When I 'REMOVE ENTITY', it goes away until the server is restarted, then it shows up again. How can I remove this more permanently?
Okay, I edited config/.storage/input_select, to remove the long entry and restarted the core. Seems happier now.
@final void posted a code wall, it is moved here --> https://paste.ubuntu.com/p/HDXPwrsyvR/
Im not sure if this is the best place to ask about card-mod type things, but I am trying to create a multiple-entity-row card that has a larger icon that changes colors depending on a condition. This is what I have so far:
https://paste.ubuntu.com/p/xbVx62mr2T/
This works in changing the color of the icon.
I have seen the code for how to increase the icon size:
style:
hui-generic-entity-row:
$: |
state-badge {
--mdc-icon-size: 40px;
}
However, I am having a hard time figuring out how to combine these two together. When do I use the $: | ? When do I include the brackets?
Okay figured it out: https://paste.ubuntu.com/p/B75Rnnp2jD/
More info on this post: https://community.home-assistant.io/t/card-mod-add-css-styles-to-any-lovelace-card/120744/1317
Do you guys edit in the browser file editor? I'm struggling with it
@worthy tapir I sometimes use it, it should be okay. What are you struggling with? I also use Visual Studio Code with the Home Assistant plugin.
just moving around in big files, copying and pasting sometimes reacts weird, indent issues constantly
it's most likely me, I'm not very experienced, but wanted to check and see if people generally don't recommend or use it so I can stop wasting my time if that's the case
I keep it around because I can kinda sorta use it to edit files on my phone when I absolutely have to, but you should look into VSCode for actual work
the addon has a browser interface that's as close to a native app as you're likely to get
k ill check it out
Add-ons 🤢 Use real VS Code on your desktop with the SSH extension.
I'm trying to make my gauge green in the middle and yellow/red at the ends, the yaml I used was
severity:
red: 0
yellow: 70
green: 100
yellow: 200
red: 300
However it seems this is not supported. Any recommendations?
That's not possible with the built in gauge card. The YAML you shared is a dictionary, which means it expects a single key/value pair for each key name (red, yellow, green). You can't provide duplicates.
There might be a custom card somewhere that does what you need but I don't know it.
ah, thanks
That looks like it's just a regular gauge, I need more like RYGYR
It's to make it easier to tell at a glance if my sister's blood sugar is "oh fuck she's gonna die" range or not
I only point it out because it seemed like a similar request. But it doesn’t actually exist
Yeah, this is where someone (maybe you, Offspec) needs to make a new card 😄
Not sure if this goes here or #templates-archived, but... I'd like to have a template value {{ (states("input_number.grill_food_probe1_target") | multiply(0.9)) | int }} show up on a card, ideally as secondary info, but really, at this point, anywhere will do.
Is it possible? Or do I have to use a template sensor and display that?
I ask because my GoogleFu is failing me, and this seems pretty useful 🙂
Or do I have to use a template sensor and display that?
This
hi, i have an apc ups. My goal is to display a timer with time left via timer-bar-card https://github.com/rianadon/timer-bar-card. The first problem is that ups does not provide the correct format to create a timer (HH:mm), so i wrote a little script to format it correctly, ```timer:
ups_timer_time_left:
duration: >
{% set time = states.sensor.ups_time_left.state | int %}
{% if time < 600 %}0{% endif %}{% if time > 60 %}{{ time // 60 }}:{{ '{:0>2d}'.format(time%60) }} {% else %}0:{{time}} {% endif %}
icon: mdi:clock-alert
so the problem now is to reload ha, but an error is shown, i have no idea what that means
Failed to call service homeassistant/restart. The system cannot restart because the configuration is not valid: Invalid config for [timer]: offset {% set time = states.sensor.ups_time_left.state | int %} {% if time < 600 %}0{% endif %}{% if time > 60 %}{{ time // 60 }}:{{ '{:0>2d}'.format(time%60) }} {% else %}0:{{time}} {% endif %} should be format 'HH:MM', 'HH:MM:SS' or 'HH:MM:SS.F' for dictionary value @ data['timer']['ups_timer_time_left']['duration']. Got "{% set time = states.sensor.ups_time_left.state | int %} {% if time < 600 %}0{% endif %}{% if time > 60 %}{{ time // 60 }}:{{ '{:0>2d}'.format(time%60) }} {% else %}0:{{time}} {% endif %}\n". (See ?, line ?).
should be format 'HH:MM', 'HH:MM:SS' or 'HH:MM:SS.F' for dictionary value
Your template isn't returning in the correct format.
What does the template evaluate to right now?
Don't share images of text. Share text.
So try to restart again, see if you get the same error.
ok trash panda
Failed to call service homeassistant/restart. The system cannot restart because the configuration is not valid: Invalid config for [timer]: offset {% set time = states.sensor.ups_time_left.state | int %} {% if time < 600 %}0{% endif %}{% if time > 60 %}{{ time // 60 }}:{{ '{:0>2d}'.format(time%60) }} {% else %}0:{{time}} {% endif %} should be format 'HH:MM', 'HH:MM:SS' or 'HH:MM:SS.F' for dictionary value @ data['timer']['ups_timer_time_left']['duration']. Got "{% set time = states.sensor.ups_time_left.state | int %} {% if time < 600 %}0{% endif %}{% if time > 60 %}{{ time // 60 }}:{{ '{:0>2d}'.format(time%60) }} {% else %}0:{{time}} {% endif %}\n". (See ?, line ?).
your pfp and banner...
You can refer to me as mono. I don't refer to you as a furry.
Your template is flawed. I think what's happening is that when it's attempting to restart, it's spinning up a new container and testing your config in there... at which point there's a window for sensor.ups_time_left to be less than 60 (or unknown), which leads to a badly formatted result from your template.
{% if time < 600 %}0{% endif %}{% if time > 60 %}{{ time // 60 }}:{{ '{:0>2d}'.format(time%60) }} {% else %}0:{{time}} {% endif %}```
yields `00:0`
{% if time < 600 %}0{% endif %}{% if time > 60 %}{{ time // 60 }}:{{ '{:0>2d}'.format(time%60) }} {% else %}0:{{time}} {% endif %}```
will simply blow up, since you can't compare a string and an int
can I specify a default value like 0?
You should be okay with defaults. The first example is the problem and will result in the error you posted.
This actually returns 0 anyway:
{% set time = 'unknown' | int %}
ook, but if the value is below 60 it returns 00:0x, if 0 it return 00:00
Anyone knows why my HA keeps adding a card with an entity on my dashboard every time i restart. (Its a Sonoff Switch(EWelink smart home plugin)
Wrong. Your template doesn't left pad the seconds.
HH:MM, so it's correct
I'm executing the script on the dev tool on ha, like shown in the image. Now we try with some test numbers exclude any error
{% set time = 64.9 | int %}{% if time < 600 %}0{% endif %}{% if time > 60 %}{{ time // 60 }}:{{ '{:0>2d}'.format(time%60) }}{% else %}0:{{time}}{% endif %} returns 01:04
{% set time = 12 | int %}{% if time < 600 %}0{% endif %}{% if time > 60 %}{{ time // 60 }}:{{ '{:0>2d}'.format(time%60) }}{% else %}0:{{time}}{% endif %} returns 00:12
oof, right, missing case, so added the check
executing this {% set time = 0 | int %}{% if time < 600 %}0{% endif %}{% if time > 60 %}{{ time // 60 }}:{{ '{:0>2d}'.format(time%60) }}{% else %}0:{% if time < 10 %}0{% endif %}{{time}}{% endif %} on dev tools returns 00:00, but insiede yaml i think something went wrong
Error loading /config/configuration.yaml: while scanning for the next token found character '%' that cannot start any token in "/config/packages/apcupsd.yaml", line 25, column 16
How would I make a 2x2 grid? adding 4 gauges in a grid creates one row with 3 gauges and a second row with one
how can I center the title of a card?
Card-mod
I am using card mod and I cant find the correct setting for that 😦
is there a way to invert a value on a gauge? Like the data is showing free space/total, but I would like it to show used space out of total or (total-free) out of total
if my sensor outputs in this format 2021-07-30T19:00:00+00:00 how would I get it to output it as 2 hours ago?
I want to use a conditional card to display like "updated 2 hours ago"
thanks I was searching for the doc
I messed up my password a couple times, how can I clear the lock out?
hi everyone. Frequently asked question that I dont know how to get working easily.
Is it possible to change state icon color to like red or green based on the value?
Legends, is there a way to list multi actions against a tap action on a button card?