#frontend-archived

1 messages · Page 198 of 1

pure hawk
karmic tiger
#

That looks promising. I've never used it, so can't give any tips.

pure hawk
#

I will look into it

exotic sun
#

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?

gusty tangle
#

THX! its perfect 🙂

#

can you have "conditional lines" in a enteties card, like you can have in a grid card?

fresh heath
#

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

naive ingot
#

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?

fresh heath
#

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

kind shellBOT
idle nacelle
#

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?

karmic tiger
#

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```
idle nacelle
#

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?

errant plover
iron timber
#

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"
karmic tiger
#

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.

iron timber
#

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

vital cedar
#

Hi, my lovelace add card cards aren't loading. Is this a known problem?

errant plover
#

No

frosty minnow
#

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.

dark dirge
#

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?

frosty minnow
#

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?

dark dirge
#

Browser console more likely

frosty minnow
#

I’ll have to check when I get back home. Thank you.

proven oar
#

@frosty minnow they are setting a header "X-Frame-Options: SAMEORIGIN" which tells the browser to not load the site when embedded

dark dirge
#

Good catch

frosty minnow
#

Bummer. Thank you for the update. I did end up finding a different site that pulls from the same satellite data and does display.

idle nacelle
timid girder
#

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?

karmic tiger
#

Currently, no.

potent nova
#

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

timid girder
#

Is there a way of hiding dashboards which don't have any visible tabs instead?

pallid storm
#

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?

thin sequoia
#

@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.

#

divider

  • type: conditional
    conditions:
    • entity: your.tv
      state: 'on'
      row:
      entity: script.your_script_off
  • type: conditional
    conditions:
    • entity: your.tv
      state: 'off'
      row:
      entity: script.your_script_on
#

Just replace your.tv and script.your_script with the right values.

low parcel
#

maybe a stupid question but how do you reorder the dashboards in the sidebar?

errant plover
#

Long press on the sidebar title and you can then edit the sidebar (drag and drop).

low parcel
#

thx

polar kelp
#

There's also a button for that in the profile settings now, I think.

open seal
#

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

feral cliff
#

Thank you.

turbid pier
#

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

versed kettle
#

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?

pallid storm
thin sequoia
#

@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.

pallid storm
#

Yeah I tried messing with the scripts and it would turn off 1 TV but not the other

thin sequoia
#

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.

pallid storm
#

Got it. Thanks!

thin sequoia
#

This should work too:

sequence:

  • service: something.turn_off
    target:
    entity_id:
    - your.tv
    - your.other_tv
pallid storm
#

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 ?

kind shellBOT
versed kettle
# kind shell

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.

upbeat wren
#

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?

simple grotto
#

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

dark dirge
#

there's an exclude section with multiple options and examples

versed kettle
errant plover
versed kettle
maiden quartz
#

Any one have an issue with Lovelace Map default zoom? Mine has stopped working, even if I try zoom in or out. 😩

simple grotto
#

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

errant plover
#

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.

simple grotto
#

ohh I see

flint hazel
#

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.

errant plover
#

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.

flint hazel
#

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

zinc dirge
#

hi guys, quick question: why is there no thumbnail for local media pictures available? my pictures are .jpg

#

i cannot send a picture, strange

vapid field
#

Hi. Can the clickable area/radius of elements in a picture elements card be modified?

carmine fern
#

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.

karmic tiger
#

What device are you running HA on?

carmine fern
#

Intel NUC, 7th gen i5, 8GB RAM, 128GB SSD

karmic tiger
#

Does the same thing happen in multiple browsers or from multiple devices?

merry kettle
#

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

karmic tiger
#

Long press the sidebar header. The hidden things should appear further down the list.

merry kettle
#

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

carmine fern
#

Also can't access via IP so not just a DNS resolver issue while it reboots

karmic tiger
#

If you hid them via some other, unofficial means, you'll have to figure out how to reverse that.

merry kettle
#

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

sturdy ruin
#

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?

merry kettle
#

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

carmine fern
sturdy ruin
#

thanks

pure hawk
#

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

sturdy ruin
#

Is there any way to create light groups within the UI?

crisp peak
#

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?

karmic tiger
#

What do the logs say?

crisp peak
#

How can I view the logs? I can't connect via SSH either.

karmic tiger
#

Could you connect via SSH before?

crisp peak
#

I have never tested this. I didn't use it.

karmic tiger
#

What installation type do you use?

kind shellBOT
#

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 docker commands or use a Docker manager and have no add-ons or Supervisor then you have #449717345808547842

  • Finally, if you use pip to install or upgrade you have #551864459891703809

Having difficulty chosing an install method? See this summary for guidance.

crisp peak
#

Installed on a RasperryPi 4

karmic tiger
#

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.

crisp peak
#

The first option. Ok thx i will write in other channel

tight scarab
#

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 😛

polar kelp
#

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

merry nexus
#

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.

stuck mulch
#

Hi, its possible to add bulb color weel to lovelace as a grid card?

vapid field
#

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?

zealous pier
#

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

crisp hornet
#

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

vapid field
#

Okay i will search on internet for that. Thank you

karmic tiger
crisp hornet
#

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

vapid field
zealous pier
#

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

vapid field
#

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]

zealous pier
#

can you give me an example of what such a URL would look like?

vapid field
#

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

zealous pier
#

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

vapid field
#

Okay thanks, i just started and im noob in HA yet. So where can i find the configuration.yaml

zealous pier
#

which installation method are you using?

vapid field
#

For now im using a Virtualmachine

#

just on windows 10

#

installing visualcode?

zealous pier
#

yeah the vs code addon is probably the easiest option for you

vapid field
#

Okay i will try thanks

#

Can't find the service this way..

zealous pier
#

have you restarted HA?

vapid field
#

Yes

zealous pier
#

Oh, I made a typo, it's rest_command, not rest_comand

#

If you copy and pasted what I wrote

vapid field
#

Ah okay i apologize

#

Okay that works fine, thank you very much

zealous pier
#

awesome 🙂 and no problem

violet creek
#

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....

karmic tiger
#

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.

violet creek
#

Tried opening devtools so I can do the "empty cache and hard reset"
Just about to try clearing localstorage 'n' all

#

No Dice :(

zealous pier
#

Are you using layout mod?

#

With a non default layout

#

Layout mod is broken in 2021.7

violet creek
#

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

zealous pier
#

One workaround is to create a new view when you want to edit

#

And then delete the view once you're done

violet creek
#

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

zealous pier
#

Ahh nice

#

Hopefully we get a fix soon

stuck hazel
#

i'm trying to get my dashboard on a google home hub, but it just says not connected

karmic tiger
#

What have you tried? What is 'it'?

stuck hazel
#

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

karmic tiger
#

So... what have you tried?

stuck hazel
#

and that works fine, but i want to get a easier way to cast it

karmic tiger
#

Did you follow the link Tinkerer shared with you earlier?

stuck hazel
#

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 ...

karmic tiger
#

That's the full error?

stuck hazel
#

yes

karmic tiger
#

.share your code for that attempt.

kind shellBOT
#

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.

stuck hazel
#

well, after path it shows the name of the page it can't find

karmic tiger
#

🤦‍♂️

#

So it's not the full error?

#

We can't help you if you don't share all relevant information when asked.

stuck hazel
karmic tiger
#

Copy the URL for the page you're trying to cast. Change the domain so no-one here knows it.

stuck hazel
#

https://#####.duckdns.org/lovelace/Startscherm like this?

karmic tiger
#

Yes. Is that the page you're trying to cast?

stuck hazel
#

yes

karmic tiger
#

🤔 It doesn't say 'Living'...

stuck hazel
#

https://####.duckdns.org/lovelace/living

karmic tiger
#

The view you're trying to access is called Startscherm

stuck hazel
#

i first want to get it working, and then make a page specifically for the Home hub

karmic tiger
#

Well you'll get it working by providing a valid dashboard and view name.

stuck hazel
#

these dashboards "Living" and "Startscherm" are currently used dashboards

stuck hazel
#

is it possible the casting to a google home device sometimes works?

steady sluice
#

Does anyone know of an alarm clock card for the frontend?

#

I found this one but its ugly and hasnt been updated since 2018

stuck hazel
#

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?

clever veldt
last hare
#

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?

split granite
#

Yes. You can also create a new dashboard you can work on manually, while leaving the auto generated dashboard alone.

dotsvertical -> Edit Dashboard
dotsvertical -> {} Raw...
Select everything, delete it, Save

last hare
#

yes but is overwhelming for me

dark dirge
#

but that's like 1, 2, 3

split granite
#

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

last hare
dark dirge
#

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?

last hare
#

my page is impty

dark dirge
#

did you do those three things?

#

is there a 3-dot menu at the top right?

last hare
#

yes

#

and there its unused entities, raw configuration editor and Manage dashboard

dark dirge
#

so keep following the instructions

#

there's only three of them

last hare
#

yes

#

how I delete those ?

dark dirge
#

delete what?

last hare
#

Sorry for wasting your time ...finally I got it

#

Thanks

arctic field
#

Hi, I'm using Webpage Card for meteo radar. Is there a way how to make it full screen when I tap on it?

vernal gull
#

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!

vernal gull
#

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?

karmic tiger
#

Just customise it.

vernal gull
#

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!

karmic tiger
#

We've seen worse 😄

potent nova
#

how do I make a card background transparent?

potent nova
#

why do card specific themes not respect light and dark mode even if they have both configured?

errant plover
carmine fern
#

Is there an easy way to change the favicon of my Hass instance?

carmine fern
#

Yeah I saw thomasloven had an easy method but I can't find his addon anywhere. Guess it's manual install only?

karmic tiger
#

I guess so. I wouldn't say that it disqualifies it as easy.

polar kelp
#

It's on hacs

#

Under integrations

carmine fern
#

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

pure hawk
#

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

karmic tiger
next turret
#

is there a button icon that dosn't show state? I need a lovelace button for my switchbot

#

To include the color

kindred anchor
#

anyone have a good entity naming convention they can recommend?

errant plover
#

domain.location_identification

kindred anchor
dark dirge
#

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)

kindred anchor
#

got it, thank you

fiery ledge
#

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?

karmic tiger
#

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.

cedar karma
#

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

kindred anchor
#

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?

wooden raptor
#

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?

flint orbit
#

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?

wooden raptor
#

@flint orbit try the ip address of ha instance, not the hostname (hassio.local).

#

clear cache on connecting device as well.

flint orbit
#

obviously not punching a firewall hole to test that off VPN

dark dirge
#

You don’t really need SSL when you’re on the VPN

wooden raptor
flint orbit
flint orbit
dark dirge
#

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

wooden raptor
#

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.

dark dirge
#

Just noticing it because I’ve never needed to do it

flint orbit
wooden raptor
gilded timber
#

the trusted proxy is the "internal end" von your vpn or whatever you are using

#

I use a wireguard client add-on

flint orbit
gilded timber
#

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)
flint orbit
gilded timber
#

I guess either the version or that upgrade thing does the trick - I am no https/websocket expert. I just googled that up.

flint orbit
#

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.

karmic tiger
#

If it does, it's because your DNS is configured incorrectly (or was, and a bad result is still cached).

gilded timber
#

yes that's a good reason

last vault
#

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 🤬

dark dirge
last vault
#

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?

dark dirge
#

I would expect so

last vault
#

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.

dark dirge
#

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

last vault
#

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.

kindred anchor
#

@flint orbit did you add the trusted proxies to the configuration.yaml?

dark dirge
last vault
#

Thank you

kindred anchor
#

@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
flint orbit
kindred anchor
#

Ah

cedar karma
#

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"

sour plover
#

hi, can anybody pls help me out?

sour plover
#

so I found out about Config Template Card Card.. but for some reason the img isn't loading

errant plover
#

Please don't share images of text.

kind shellBOT
#

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.

sour plover
#

👍🏾

#

Sooo I got config-template-card,, got the right piece of code, but for some reason the image isn't loading

errant plover
#

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'}}

sour plover
#

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

sour plover
#

like it should I guess?

errant plover
#

Which template card are you using. There are two.

sour plover
#

wdym?

errant plover
sour plover
#

this one

errant plover
#

Can you share your full card config rather than just the template.

sour plover
errant plover
#

The template has to be quoted. image: '${IMAGE_URL}'

sour plover
#

it get's unquoted after reopening

errant plover
#

🤷‍♂️

boreal trellis
#

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?

grand star
#

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?

fiery ledge
#

the back button can not be hard coded because of that. Looking for something like window.location.pathname.previous (which of course doesnt exist)

#

no, doesn't work correctly, simply takes me to my main view because of non existing path....

arctic tundra
#

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?

tacit cave
fiery ledge
#

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?

tacit cave
#

and does navigation_path field run javascript?

#

hint: No

fiery ledge
#

nope indeed.... I merely posted that to illustrate what I was looking for

tacit cave
#

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.

fiery ledge
#

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.

weak prism
#

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

fiery ledge
#

replace the entity and you're practically set (..)

weak prism
#

thanks! I knew i saw it somewhere, but couldn't find it back and wondered if I was dreaming

#

😄

fiery ledge
weak prism
#

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 😄

chrome phoenix
#

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?

dark dirge
#

Restart HA and clear your browser cache

chrome phoenix
#

Ill go do some more investigation

#

thanks!!

vital sand
#

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

candid lintel
#

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?

polar kelp
#

Explain why and maybe we can find something.

sour plover
#

NGL but why instead of javascript for custom cards is it not just backed by PHP...?

candid lintel
# polar kelp Explain why and maybe we can find something.

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)

orchid lagoon
#

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?

polar kelp
#

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?

sour plover
#

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

simple scroll
dark dirge
#

are you putting that in the UI YAML box?

#

If so, you need to remove the leading "-" from the first line

simple scroll
sleek cliff
#

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

dark dirge
#

width The current width of the browser window in pixels.
height The current height of the browser window in pixels.

sleek cliff
dark dirge
#

I'm sure there's some goodness in there 🙂

polar kelp
#

And mediaquery

native cairn
#

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?

dark dirge
#

Devices that are currently at home won't show on the map.

native cairn
#

oh

#

okay cool

#

like I said, probably dumb 😄

dark dirge
edgy plaza
#

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 ?

zealous pier
#

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

edgy plaza
#

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. 🙂

steady sluice
#

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?

errant plover
#

Why are you not using an input_datetime?

steady sluice
#

Oh I somehow didnt see that

#

Does that work in military time?

errant plover
#

If your profile is set to 24hour time.

steady sluice
#

Oh it isnt

#

Do you know what happens if I reboot?

#

Does it keep the times?

flint heron
#

Is there a notepad or excel-style spreadsheet editor that allows me to write text directly on the ui

errant plover
boreal trellis
#

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."

flint heron
steady sluice
urban plover
#

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.

graceful tangle
#

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).

faint root
#

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 ?

cold tiger
#

hi. where can i change the icon and title of the default overview dashboard, if it's in yaml mode?

faint root
#

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 ?

dark dirge
#

Is it a list? What is your card config and the attribute?

cosmic flume
#

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.

eternal elbow
#

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?

strong falcon
#

Can I make action: url open in a new tab?

dark dirge
#

but as mentioned earlier, anything can be overridden in dev tools

eternal elbow
#

I'll check that out, thanks.

dark dirge
#

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

eternal elbow
#

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.

dark dirge
#

you could build your own RPi-based server that takes a token via REST, or something like that

eternal elbow
#

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.

dark dirge
#

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

eternal elbow
#

haha. Oh boy. Yeah nope. I'd be more likely to create an alexa OTP interface where I could give someone the command word.

midnight nexus
dark dirge
#

Indeed:

midnight nexus
#

Thank you @dark dirge Turns out I believe I answered my own question....

worthy tapir
#

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

dark dirge
narrow falcon
#

Hi anyone here ?

errant plover
#

Nope. I'm not.

narrow falcon
#

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

errant plover
#

What about layout-card?

narrow falcon
#

let's try that

#

same as non panel card

#

huge margin left and right

#

nope still centered or bigger 😦

errant plover
#

Got a screenshot?

narrow falcon
#

i manage to almost did it

#

can't post picture in this channel

#

😮

#

if i enlarge the graph, the height also goes up

kind shellBOT
narrow falcon
#

code wall lol, like 10 lines

karmic tiger
#

20...

kind shellBOT
#

@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/.

narrow falcon
#

16

#

anyway

#

i won't do it again

#

🙂

karmic tiger
#

The bot doesn't know or care what's code and what's text. Anyway... walls of text are annoying, especially for mobile users.

narrow falcon
#

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

karmic tiger
#

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.

narrow falcon
#

right, it just took me off guard

opaque hollow
#

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?

polar kelp
#

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.

opaque hollow
polar kelp
#

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.

opaque hollow
#

It seems like I got this idea from one of such custom cards usage examples

sacred onyx
#

Are there any other beautiful thermostat cards except for the default one and simple-thermostat?

woven echo
#

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

dark dirge
#

no need to guess. what do the logs say?

woven echo
#

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

dark dirge
#

yes, it should

#

where did you put those lines?

woven echo
#

in the configuration for the nginx addon

dark dirge
#

well, that's not right

woven echo
#

oh, I have to put it in my configuration.yaml, I see

dark dirge
#

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:

woven echo
#

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

lost hatchBOT
karmic tiger
#

Please keep bot spam to #botspam

worthy tapir
#

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..

buoyant jewel
#

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

karmic tiger
#

Which custom cards are you using?

#

Your link requires a login. Use a proper image sharing tool like imgur...

buoyant jewel
#

??

#

weird

#

custom button card

karmic tiger
#

That isn't the only one you're using.

buoyant jewel
#

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

karmic tiger
#

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.

buoyant jewel
#

cheers fixed

cold shoal
#

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.

reef wadi
#

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
#

hi, is it possible to define with when using grid?

#

width*

reef rune
#

@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?

karmic tiger
#

Sounds like a caching issue. Unlikely to be HA itself that's to blame, more likely your browser.

reef rune
#

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

polar kelp
#

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

jagged vapor
#

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 %}```
dark dirge
#

That’s incorrect syntax

#

You’re comparing the sensor state against ‘true’?

jagged vapor
#

I tried against measurement

#

When I tried it..it shows the same

dark dirge
#

states(‘sensor.soil_moisture’)|float < 100

jagged vapor
#

What should be writen in the else section?

#

I want the sensor value to return if the moisture is less than 100

dark dirge
#

Could just be ‘else’

#

It always has to return something

jagged vapor
#

yes...so what should be written there?

dark dirge
#

What do you want there?

jagged vapor
#

{{ states('sensor.soil_moisture') }}

#

Is this correct

#

or something else?

dark dirge
#

It’s fine

jagged vapor
#

becoz I m unable to get the sensor value using that

dark dirge
#

If it works in devtools -> templates, it will work there

#

Your tests were completely wrong, so all bets are off for the version you posted

jagged vapor
#
             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

polar kelp
#

Change all of {% elif …%} to just {% else %}

jagged vapor
#
             100
          {% else %}
             {{ states('sensor.soil_moisture') }}
          {% endif %}```
jagged vapor
jagged vapor
karmic tiger
#

Your question is still on screen. Be patient.

jagged vapor
#

ok thankyou

errant plover
jagged vapor
#

But I can see its values on my serial monior

errant plover
#

Share your template sensor config

jagged vapor
#
  - sensor:
      - name: "Soil Moisture"
        icon: mdi:water-percent
        unit_of_measurement: "%"
        state: "{{ ( [0, state('sensor.soil_moisture'), 100]|sort )[1] }}"
      ```
errant plover
#

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') }} ?

jagged vapor
errant plover
#

Yeah I stuffed up the template. It should be state: "{{ ( [0, state('sensor.soil_moisture')|float, 100]|sort )[1] }}"

jagged vapor
#

With the template, It shows unavailable

errant plover
#

Read the message just above yours.

jagged vapor
errant plover
jagged vapor
#

Yes restarted hassio from server control tab

errant plover
#

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.

jagged vapor
#

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

errant plover
#

What does the template editor show for: "{{ ( [0, states('sensor.soil_moisture')|float, 100]|sort )[1] }}"

errant plover
#

And what about {{ states('sensor.soil_moisture') }} ?

#

Also you probably have to wait for sensor.soil_moisture to update.

errant plover
#

Try it without the spelling mistake

jagged vapor
errant plover
#

Try this in the editor {{ states('sensor.soil_moisture') }}

errant plover
#

Then your template sensor is correct

jagged vapor
errant plover
#

Your sensor is reading 0 so the template returns 0

jagged vapor
errant plover
#

Then you have the wrong entity id in your template

jagged vapor
#

entity id is correct...I had checked it

errant plover
#

This {{ states('sensor.soil_moisture') }} should return 128 if it was the right entity id

jagged vapor
#

entity ID is correct..I m assuring u

errant plover
#

Screenshot the the line in developer tools states where you are reading 128

#

and share it via imgur

jagged vapor
#

It shows 128

errant plover
#

Yeah, but no. Go to Developer Tools / States and see what Home assistant thinks the value is.

jagged vapor
errant plover
#

Lower down in the list. What is the value?

jagged vapor
errant plover
#

There's your problem. Home Assistant is not reading your soil moisture sensor.

past field
#

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 %}"`
#

i have tried to add the entity sensor by name sensor.upstairs and didn't really get anywhere.. but probably doing this wrong.

dark dirge
#

You’re confusing a template sensor with a card

#

Unless those are really two separate things that you just pasted together

past field
#

I guess i was looking at it as dynamic template within the card that would be able to template the state

dark dirge
#

That’s not a thing with that card

past field
#

since template: was valid input to the card

dark dirge
#

Define your template sensor and then use the new entity in your card

karmic tiger
past field
#

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.

past field
errant plover
#

You could do it with the custom button card.

grand harbor
#

Can anyone tell me how to fix this? It happened to all my entity cards basically...

polar kelp
#

Update template-entity-row

grand harbor
#

Is that in HACS?

polar kelp
#

Yes. Do you have it installed?

grand harbor
#

Yes sir

polar kelp
#

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.

grand harbor
#

/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!

warped yew
karmic tiger
#

It's a very powerful custom card. You can style it almost any way you can imagine.

errant plover
polar kelp
mild cliff
#

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?

karmic tiger
hybrid jackal
#

hello , when i have in developer tools state attributes, how can i change some of them , to do my tests

karmic tiger
#

Type in the box, click 'set state'.

hybrid jackal
#

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
karmic tiger
#

Whatever you want to test.

#

And... don't paste code walls here. Use a sharing tool.

hybrid jackal
#

okay. sorry

#

but this not work. Just source: YouTube and cilck set state

#

not change the state

karmic tiger
#

You said you wanted to change the attributes. If you want to change the state, it's the smaller box above.

hybrid jackal
#

yes , I want to change state attribute

#

oh ..i understood

#

thank you

whole heron
#

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...

#

ah and the name: changes aswell...

whole heron
#

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?

dark dirge
#

Yes

polar kelp
whole heron
#

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

indigo crypt
#

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)

polar kelp
#

That’s not a recommended way to install Home Assistant, and it’s very unlikely to give you a supervised install.

indigo crypt
#

okay i see. i was wondering if it was deprecated or my config was wrong but that makes sense, after i read some documentation

whole heron
#

oh man

whole heron
#

when u got 1 - instead of an _ in your customize

#

😠

solar torrent
#

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?

bitter bolt
#

what should i use to display HAS on my tablet in a nice way? the app, or is there something better?

paper nebula
#

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 😩

umbral kettle
#

Hey guys is it possible to add sensors to android power menu?

errant plover
weak prism
#

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)

dark dirge
#

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 ;
   ]]]
weak prism
#

it doesn't give an error, but also doesn't return anything with that

#

sorry my bad

#

had a typo

ivory dust
#

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?

shell island
#

Hi all! Is there known card (possible a gauge?) that will support negative values?

faint vortex
#

I remember having it working at one point but I'm not sure exactly what I did

kind shellBOT
viral scarab
polar kelp
#

Hass version?

viral scarab
#

2021.7.4

polar kelp
#

You're definitely missing a type: there.

viral scarab
#

hmm. I copied and modified from the github page, their config only has one type at the top. Where would you put it?

polar kelp
#

Where did you copy it from?

#

Found it.

viral scarab
#

Just copied the stuff above the divider obviously

polar kelp
#

Yep. That example is faulty. It should start like all the other ones: ```yaml
type: entities
entities:

  • type: custom:paper-buttons-row```
kind shellBOT
viral scarab
#

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.

karmic tiger
#

If you're worried about messing up a dashboard when you make edits, make a separate dashboard for experimenting in.

polar kelp
#

Try a cache clear.

viral scarab
#

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)

karmic tiger
#

What about with a real browser like Chrome?

viral scarab
#

lol I'll download it... one sec

#

fresh install of chrome: same behavior

karmic tiger
#

Sounds like maybe a quirk of whatever embedded editor the UI uses.

dark dirge
#

it has many quirks

viral scarab
#

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

karmic tiger
#

Is your system using a RTL or LTR language?

viral scarab
#

I'm just US english, to LTR

#

problem goes away if i switch tabs and come back

karmic tiger
#

That's a weird one

#

If you have these issues frequently, consider switching to YAML mode and using a real editor (outside of HA)

viral scarab
#

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?

polar kelp
#

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.

unkempt chasm
#

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

dark dirge
#

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

wooden carbon
#

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

real salmon
#

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.

wooden carbon
#

What installation type are you running? Docker? OS? Core?

polar kelp
#

Start by removing all resources.

#

And custom integrations that add resources, like dwains theme, browser_mod, fontawesome... stuff that do stuff to the frontend

real salmon
#

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).

faint vortex
#

Can I somehow remotely reload the frontend on a tablet home assistant app? Or have it automatically reload it every X minutes/hours?

ivory dust
#

Does anyone know a panel that looks like the dimmable light panel but is an rgb wheel for rgb lights instead?

wooden carbon
#

On the docker version, all the errors should go to standard error. ‘docker logs xxx’ doesnt show anything?

wooden carbon
faint vortex
#

So should I start has via a browser instead of the home assistant app, or will the browser mod use the app as well?

errant plover
#

I don't understand your question.

ivory dust
icy cradle
#

It is just an integration/component that gets installed into HA

#

And you can use HACS (which is another integration) to install browser_mod.

solar torrent
#

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?

dark dirge
#

‘navigate’

solar torrent
#

ah will try that, thank you!

faint vortex
solar torrent
edgy acorn
#

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

real salmon
wooden carbon
#

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

real salmon
#

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?

wooden carbon
#

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

icy cradle
real salmon
real salmon
vapid field
#

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.

edgy acorn
#

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

vapid field
#

gootynz, have you done a snapshot before the update and did you try to switch back ? I don't have argon / tasmota.

edgy acorn
#

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

vapid field
#

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

edgy acorn
#

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

vapid field
#

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.

burnt hill
#

@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?

polar kelp
#

Yes. Since the latest version. It’s in the readme.

burnt hill
#

thank you

random pivot
#

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?

karmic tiger
#

The former

icy patrol
#

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.

heavy violet
#

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...

real salmon
#

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?

real salmon
icy patrol
#

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
dark dirge
#

If pfSense is your proxy, no

icy patrol
#

thanks @dark dirge im sorry; how do i confirm if pfSense is my proxy?

dark dirge
#

only you would know that

icy patrol
#

hmm it might be my HAProxy on pf..

dark dirge
#

yes

#

in any case, your logs would have told you the IP of the proxy

icy patrol
#

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

dark dirge
#

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

icy patrol
#

got it! thank you

wooden carbon
real salmon
wooden carbon
#

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

real salmon
wooden carbon
#

let me see what my perms look like

real salmon
wooden carbon
#

everything is owned byt root:root

kind shellBOT
wooden carbon
#

@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

real salmon
#

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.

wooden carbon
#

Might be inconsequential in your case, but i would always test in a private/incognito browsing mode, this way, nothig gets cached between refreshes

real salmon
#

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

real salmon
lavish elbow
#

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.

solar torrent
#

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

dark dirge
#

To start, you have an ‘if’ with no else

#

What card is that?

gleaming wedge
#

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.

solar torrent
#

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

wooden carbon
lavish elbow
wooden carbon
#

Then you’ll need to rewrite the code 🙂

wooden carbon
lavish elbow
#

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.

wooden carbon
#

Sounds fun.

honest swan
#

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. 👍

lethal jungle
#

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.

stuck hazel
#

small question: i have a button and i want it to run a script and open a url, how can i do this?

karmic tiger
#

Buttons can only call one service per action, so you'd have to call a single script that does multiple things.

stuck hazel
#

ok, second question: how do i implement opening a url in a scrip?

karmic tiger
#

Opening a URL where and why?

stuck hazel
#

on the device that activates the script

karmic tiger
#

That answers half the question...

stuck hazel
#

i want to receive a notification if my kids press the button to open the url

#

so the script handles the notification

karmic tiger
#

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.

stuck hazel
#

you can easily setup the button to open the url, no easy way to make a button do 2 things?

karmic tiger
#

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?

stuck hazel
#

i am aware of that

karmic tiger
#

And if your wish is to monitor, there are better ways to do it (none of which are childproof, since children are sneaky bastards).

echo hearth
#

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.

karmic tiger
#

I'd start by clearing the cache.

echo hearth
#

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.

karmic tiger
#

Not sure if that's related but that hints at problems with your proxy config.

echo hearth
#

Mhm, good point!

#

But Home Assistant is working on the same smartphone using Firefox, same goes for desktop using Chrome/Firefox.

karmic tiger
#

That's strange... and that dev doesn't seem interested in helping 🤦‍♂️

echo hearth
#

Mhm you can say that again :p

karmic tiger
#

I'm not sure what to suggest. If it works in other browsers, it's Bromite 🤷‍♂️

echo hearth
#

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 😕

vapid field
#

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?

errant plover
vapid field
#

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...

errant plover
distant briar
#

is there a reason why HA doesn't have a https interface like pretty much every other web based system out there does?

dark dirge
#

you can configure it to do so

distant briar
#

i thought from what i can read you have to use some convoluted reverse proxy

dark dirge
#

no

#

create a self-signed cert or use a real domain/cert, such as through Let's Encrpt, as it mentions

distant briar
#

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?

dark dirge
#

yes

distant briar
#

right ok. cool. i'll give that a bash then

#

thank you rob

weak prism
#

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

round lily
#

oh you want to disable it fully?

round lily
weak prism
#

thanks

#

yeah i couldn't find it, even though it makes sense

#

looking at my header being the same

round lily
#

header is documented on the repo

weak prism
#

yeah I had the header already hidden, but some how didn't make the link, to do the same for legend

lime herald
#

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

unborn pawn
#

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.

errant plover
cold shoal
#

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...

errant plover
#

Use templates to tidy it up.

cold shoal
# errant plover 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).

distant briar
#

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?

errant plover
#

You can add any entity type to an area.

heady jasper
#

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.

worthy tapir
#

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

cerulean relic
#

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.

kind shellBOT
final void
#

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?

worthy tapir
#

Do you guys edit in the browser file editor? I'm struggling with it

final void
#

@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.

worthy tapir
#

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

dark dirge
#

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

worthy tapir
#

k ill check it out

karmic tiger
drifting pagoda
#

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?

karmic tiger
#

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.

drifting pagoda
#

ah, thanks

dark dirge
drifting pagoda
#

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

dark dirge
#

I only point it out because it seemed like a similar request. But it doesn’t actually exist

karmic tiger
#

Yeah, this is where someone (maybe you, Offspec) needs to make a new card 😄

dense thicket
#

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 🙂

karmic tiger
#

Or do I have to use a template sensor and display that?
This

sage flare
#

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 ?).

karmic tiger
#

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?

sage flare
karmic tiger
#

Don't share images of text. Share text.

sage flare
#

sensor value is 64.2, by executing the script is 01:04

#

is correct, isn't it?

karmic tiger
#

So try to restart again, see if you get the same error.

sage flare
#

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...

karmic tiger
#

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
sage flare
#

can I specify a default value like 0?

karmic tiger
#

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 %}

sage flare
#

ook, but if the value is below 60 it returns 00:0x, if 0 it return 00:00

copper yoke
#

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)

karmic tiger
sage flare
karmic tiger
#

No 🤦‍♂️

#

00:0 isn't HH:MM

sage flare
#

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

karmic tiger
#

And now try a number less than 10... 🤦‍♂️

#

You know, like in my example.

sage flare
#

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

tender bronze
#

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

heavy warren
#

how can I center the title of a card?

errant plover
#

Card-mod

heavy warren
#

I am using card mod and I cant find the correct setting for that 😦

tender bronze
#

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

heavy warren
#

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"

dark dirge
#

“yourstring”|as_datetime| relative_time

heavy warren
#

thanks I was searching for the doc

lavish mountain
#

I messed up my password a couple times, how can I clear the lock out?

marsh wadi
#

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?

quaint snow
#

Legends, is there a way to list multi actions against a tap action on a button card?