#frontend-archived

1 messages · Page 18 of 1

tribal galleon
#

For icon_color, try yaml icon_color: | {{ (states(entity)=="on") | iif("green", "red") }}

#

But it looks like the card_mod might be wrong for the switch entity you shows. You have two ha-cards defined.

ripe jungle
#

Is anybody aware of a card that shows sensor data history in a table? I'd just like to see a raw (ish) list of values.
I haven't seen one which makes me think I'm missing something important.

zealous vine
#

Is it possible to fade between Icons on state change with a custom button card

tepid island
#

Hello, I'm new to Home Assistant. Does anyone know what I need to do to get a battery status in the top corner of a mushroom card?

main meteor
#

It would be nice to see the latest state directly in the entities list. Any option to this?

vast crane
#

Could you elaborate a bit? What is the "entities list"?

dreamy pond
#

Really strange but I've tried so many things and I can't get it to change. Usually icon color changes are so simple

acoustic ore
#

Looking for help to clean this up

You may not be getting optimal performance out of card-mod. See https://github.com/thomasloven/lovelace-card-mod#performance-improvements

I have this in my config however it still give the error. I got the path from when installin with HACS that is what pops up

frontend: themes: !include_dir_merge_named themes extra_module_url: - /config/www/community/lovelace-card-mod/card-mod.js

#

What am I missing

clear pier
#

I've just upgraded and my dashboards all look like this in firefox - perfectly fine in chrome. I've cleared cache etc.. no errors in console

tribal galleon
#

For the rotation animation, try this yaml card_mod: style: mushroom-shape-icon$: | ha-icon { --icon-animation: rotation 2s linear infinite } @keyframes rotation { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

marsh wyvern
#

Holy lovelace rage... trying to get my cards arranged/lined up and the word wrap type behavior is driving me nuts

#

is there a way to drag/drop tiles or a nice clean replacement

#

not looking to rebuild all of my dashboards

inland token
#

Hi All, need help installing button-card or any other custom cards

#

Can't find a guide that isn't obsolete

#

Is it still a thing, or deprecated?

tribal galleon
# marsh wyvern not looking to rebuild all of my dashboards

IMO, layout is one of the harder things to get to work properly with custom dashboards, particularily with tablet dashboard design. I use a combination of horizontal-stack, vertical-stack, grid, and custom:layout-card cards. I sometimes use custom:gap-card for spacing. I also use card_mod with position, top, left, and z-index settings for placement.

tribal galleon
inland token
#

Ok. Did that. button-card not found in hacs

tribal galleon
#

Did you search frontend?

#

Followed by

inland token
#

That was the issue! Thanks! When making a group of preset buttons (stations, brightness, volume, etc.) Is there an easier way than making a seprate button manually for each preset level? Right now, I have several buttons in a horizontal group, but re-using the group with anothe rentity requires manually editing each button, rather than copying the group & somehow saying "this is for light #2"

#

Wanting to make a volume control for each room with presets for soft/med/loud/off

#

Or do I need to do it as a single custom button & start writing code?

#

I guess I mean a custom card

tribal galleon
#

Custom Button Card templating. Basically, make a button the way you want. Take that code and drop it in the Raw Editor. And subsequent buttons can refer to the template. Settings applied to the individual button will override the template. https://github.com/custom-cards/button-card#templates-support

      - type: custom:button-card
        template: generic_custom_button
        entity: light.living_room1
        icon: mdi:lamp
      - type: custom:button-card
        template: generic_custom_button
        entity: light.living_room2
        icon: mdi:lamp
      - type: custom:button-card
        template: generic_custom_button
        entity: light.kitchen
        icon: mdi:ceiling-light-outline
        hold_action:
          action: navigate
          navigation_path: /fire-main/kitchen```
#

My generic_custom_button template is 32 lines long.

inland token
#

I'll give it a look. I just downloaded HA a few days ago. Learning curve is steep, even for a 40-year programmer.

tribal galleon
#

When you start getting "fancier" with the templates, you can incorporate variables to cut down on the repeated code.

inland token
#

What are these custom cards written in? Looks like VMicrosoft isual Studio projects and typescript? I though HA was python.

tribal galleon
#

I'm 43 with no real programming experience. Dabbled in BASIC, Pascal, and VisualBasic for Applications in high school. Been working with HA for about two years now. Have a very basic but working knowledge of Python and JavaScript now (because of the dashbboards and automating in Node-RED).

#

Cards are commonly written in JavaScript, TypeScript and, I think, Python/Jinja.

inland token
#

Thanks for the help! I'll be back after playing with the custom button cards!

tribal galleon
#

Between custom:button-cards and Mushroom cards, you can do just about anything you want to design for your dashboard. It is just a matter of getting it to work. My dashboard's YAML if you want to browse: https://pastebin.com/gaFmay1B

inland token
#

Making my first card. This apparently breaks the card. Guessing there is no error log to get hints from.

#

styles:
card:
- background-color: |
[[[ if (media_player.living_room.volume_level == 0.4) return "red" ;
else return "green"; ]]]

#

The comparison part apparently breaks the whole card

#

Is there such thing as a debugger or language reference, or is it just learn by example with this stuff?

dark dirge
#

That doesn't look like it follows any proper format

#

You have to review the docs for the card you're using. They either use JavaScript, both of which have ample documentation

proud kite
#

Can I update the css for cards in the yaml? If not, where?

dark dirge
#

Look into card_mod

rich lotus
#

hey RobC - do you know if the "manage resources" resources has been removed intentionally from the lovelace raw config editor????

dark dirge
#

It was never there

rich lotus
#

errrr......three dots

dark dirge
#

configuration -> Dashboards

dark dirge
rich lotus
#

2023.5.4 is under 3 dots

#

also under dashboards in settings previously

#

now not in either

dark dirge
#

Hmm, I've never seen it there. It's there in 6.0

rich lotus
#

youre seeing it in 6.0???

dark dirge
#

Yes

rich lotus
#

mine is missing

dark dirge
#

In dotsvertical in both places

rich lotus
#

hang on

#

AM STUPID........

#

advanced mode

dark dirge
#

That too

rich lotus
#

sorry for being a dumbass

dark dirge
#

I never saw it in the dashboard itself. It I do it all in YAML

rich lotus
#

am tracking down my ongoing database issue and have installed on bare metal rather than in a VM and am re-instigating line by line everything to see what seems to be breaking the database

#

so a brand new installation this morn, have gotten all the template entities installed (about 300 of them) and am now doing the dashboards, and I use css for the font styling but couldnt find the three dots to specify the stylesheet stuff

small osprey
dreamy pond
dreamy pond
patent stone
#

Any one can help how I can add text divider on my dashboard?

shadow vessel
#

Has anyone noticed with 2023.6 browser mod popups title size has shrunk dramatically? I can't seem to find what to use for the style to fix that

lofty remnant
#

Hi, does anyone know where I can find animated parts to create a widget to view power consumption? Loading from solar, etc., I need to find individual elements such as solar, workshop, animated arrows, etc

#

I plan to create my widget using picture elements

#

And I plan to do something such that when I click on, for example, solar, the tile changes and I see its graph, maybe in this picture elements I can add a solar charging graph as a photo?

shell kelp
#

hey, just upgraded HA and now my UI looks like that

#

any idea what's the issue ?

lyric prairie
#

Update the custom cards in HACS

shell kelp
#

I can't

lyric prairie
#

Minimalist updated to version 1.3.5?

shell kelp
#

I think there is an issue with HACS with the new HA update, I can't click on the update button

#

well that blows I can't restore to the previous verison

shadow vessel
#

It looks like you kept your stuff significantly out of date..

inland token
#

What language docs apply to the custom button card? I see lots of bracket characters in the usage examples. Is yaml the markup language used? If so, when can I find a reference or grammar?

lyric prairie
inland token
#

I don’t think that helped at all. I downloaded ha a week ago. How do I find this page?

lyric prairie
#

In general Home Assistant uses yaml to set all manual configurations, custom button card can use additional JavaScript within [[[]]]

inland token
#

Ok. Where is there a reference for yaml? It seems that indents follow rules, where can I read about the rules?

lyric prairie
inland token
#

Oh, it really is YAML. The parser definition language from 30 years ago. Thought it was something the authors made up.

plain pike
#

🤦‍♂️

inland token
#

So, the many brackets are escape characters and everything inside is JavaScript? Is some variation of JavaScript?

lyric prairie
#

Just plain JavaScript with some additional helpers to access HA items, those are explained in the JavaScript templates section of the documentation

tribal galleon
# small osprey May I ask where do you store the template? I need to start using template becau...

The custom:button-card templates go in the Raw Configuration Editor. Click the 3 dotsdotsverticalin the top right corner > Edit Dashboard > 3 dots again > Raw Configuration Editor
Put your templates (generally) towards the top, before views:. You'll start the section like so: yaml button_card_templates: name_of_the_template: ...all your template data here... ...just like you used in your dashboard... ...you can even include entities, names, whatever ...even if it is going to be customized with each button....You can look at my dashboard's YAML at https://pastebin.com/gaFmay1B
The above code can be found starting at Line 62.

#

Here's an example for usage```yaml

  • type: custom:button-card
    template: generic_custom_button
    entity: light.living_room1
    icon: mdi:lamp```Even though the template has an entity and icon defined, because they're added here, these will override the template's data for those items. (Line 1487)
#

Tip: A template can even reference another template. (Line 127)

tribal galleon
unique violet
#

I have a type: entities card with several switches and things with secondary_info: last-changed. Right after that is clicked, it will often show a value like "In 13 seconds", for a few seconds. Is there any way to get the front-end and back-end synched better?

dark dirge
tribal galleon
# inland token styles: card: - background-color: | [[[ if (media_player.living_ro...

HA likes to pass numbers as strings. You need to parseInt or parseFloat before a comparison. (Other cards may need the value piped into int or float ( | int or | float)

type: custom:button-card
entity: sensor.bedroom_temperature
name: '[[[ return parseFloat(entity.state).toFixed(1) + "°F" ]]]'```(In this case, I could have just left it as a string because I'm only using the value as the name but I also wanted it fixed to one decimal.)
#
  - type: custom:mushroom-template-card
    entity: sensor.s22_ultra_battery_level
    primary: S22
    secondary: '{{ states(entity) }} {{ state_attr(entity, "unit_of_measurement") }}'
    icon: |
      {% set state = (states(entity) | int) %}
      {% if state >= 75 %} mdi:battery-90
      {% elif state >= 33 %} mdi:battery-40
      {% else %} mdi:battery-10
      {% endif %}```
inland token
#

Ok. No argument. Just can’t figure out what docs to read, as it looks like my yaml must contain some combination of yaml, JavaScript, python, something called jinja, html, css, and various functions. I’m trying to avoid learn-by-example. I found a solution to my earlier question by looking at other examples. Apparently, you have to wrap a function around some things and not others to reference them. For example: The docs for custom button card have an example that says to use entity.attributes.volume_level in an IF statement. I learned yesterday that it’s flat-out incorrect. In reality, you have to use states[‘media_player.xyz’].attributes.volume_level. So, I guess my questions are as follows: What language is the stuff in brackets? Is it jinja? Where is a list of these functions like states, rgb, is_state, etc? That seems to be my main struggle as a noob. Being frustrated that the examples in the docs don’t work & not knowing what reference I need to go to. I guess “sensor” in the docs is just a placeholder & not used literally, you are expected to know to put a function there.

dark dirge
#

Again, read the docs first the thing you're using. Are you actually trying to configure a card?

#

Your questions are far too general to be answered

tribal galleon
#

He's learning to work with the custom:button-card.

dark dirge
#

You're just going to get incomplete answers that will beget more questions and confusion

#

Alright. There are many, many examples of the JavaScript that it uses in the docs for the card

#

And the fact that it's JavaScript

#

It's the 'I don't know what docs to look at' part that I'm confused about. The docs for the card

inland token
#

Ok. So, the docs for the card show an example using an if-then for a style. The example shows using entity.xyz, which obviously doesn’t work. Are the docs just out of date?

tribal galleon
#

Honestly, he's trying to learn everything all at once and in a short period of time. Frontend and HA, in general. Jumping straight into one of the most configurable cards, but still a bunch to grasp.

#

I just kind of breezed through looking at pictures until something caught my eye and then looking to see if there was discussion/code on how it was accomplished. Plus, just looking at random code gave me a better understanding.

inland token
#

Okay, perfect example. These docs tell me that I can set the style of the button with the style attribute. Easy to understand. How do I get from there to the code in whatever language it is in triple-brackets? What do a do I go to for that part? Looks like a variant of JavaScript with some added functions.

#

I’m just looking for the character-escaping rules, language docs, and ha-specific function docs

#

That part seems to be learn by example so far

tribal galleon
#

Are you asking how do you actually enter the code into the card?

inland token
#

No, asking what docs/references to read to learn the syntax of the code, escaping rules, and ha-specific build-in functions

tribal galleon
#

Honestly, never looked that hard into it. Majority of my information has come for the card's Github and the examples provided there and the examples and discussion in the forum link posted above. But, there's always the Developers area that might be more for what you're looking for. https://developers.home-assistant.io/docs/frontend
But, I don't think that information is really needed for 95% of the people that participate in this room.

#

Additionally, as you start dealing with more custom cards, you'll learn that most cards handle things differently. What works in one card may not necessarily work in another card. But, the concepts can, generally, be adapted.

inland token
#

You’re probably right. When I see these functions in the code, I wonder what other functions exist that might be useful.

tribal galleon
#

Really just understanding how the card gets the state and/or attributes for an entity is the most important thing. Such as, ```yaml

  • type: custom:button-card
    entity: light.living_room1
    name: '[[[ return entity.attributes.brightness]]]'
    show_icon: false``````yaml
  • type: custom:button-card
    entity: light.living_room1
    name: >-
    [[[ if (entity.state === "on") return "Yup"; if (entity.state === "off") return "Nope"; else return "Dunno"]]]
    show_icon: false```
lavish solar
#

i just added my ft3 water sensor to the energy dashboard and its charted in gal. is that expected?

#

only place I see it mentioned is a comment on discord but didn't see any response to it

small osprey
dreamy pond
delicate surge
#

After updating to the latest HA version, has anyone else seen their media control bar on the bottom of the HA media page go invisible... and then just spin circles when operating? It's still playing music, but no way to control anything other than just playing or stopping the play button on the playlist?
I've tried restoring to an earlier backup before this went away, which brought it back visible, but then something might have auto-updated and it happened again. What's strange is that it DOES show up on an older iMac running Chrome in an earlier version of MacOS but not on this M2 MacBook Pro in Chrome or Safari. I just refreshed the browser page on that iMac and the whole media bar went away as well.

oak solar
#

Ok guys I messed up bad, I accidentally overwrote my raw config editor on my dashboard. There seems like there's no way to undo it.

#

Is my only option to restore from backup?

vast crane
#

Might not need to do a full restore, I imagine the yaml is just stored inside the backup. You could just unpack it and copy your old yaml back.

oak solar
#

@vast crane Would that version of yaml be in a partial backup?

#

Or only full backup?

vast crane
#

don't know, I'm not really a backups expert

#

I'd just unpack it and sniff around for what you can find.

oak solar
#

Reboot did the trick! Many thanks!

small osprey
verbal flame
#

Is there a way to remove the background of mushroom chips card?

verbal flame
foggy ruin
#

I was refered to this channel because i have a problem with traefik + HASS reverse DNS. Is this the right channel to ask my question? 🙂

golden mistBOT
#

@light nimbus I converted your message into a file since it's above 15 lines :+1:

tribal galleon
# verbal flame Is there a way to remove the background of mushroom chips card?

Use --chip-background: none;. Here's one of my experiments with an entity chip.yaml type: entity entity: person.derek use_entity_picture: true card_mod: style: | ha-card { border: unset; --chip-box-shadow: none; --chip-background: none; --chip-font-size: 24px; --chip-padding: 0 0.3em; --text-color: red; --chip-height: 75px; --chip-border-radius: 45px; }

acoustic ore
#

Looking for help to clean this up

See https://github.com/thomasloven/lovelace-card-mod#performance-improvements ```

I have this in my config however it still give the error. I got the path from when installin with HACS that is what pops up

```frontend:
  themes: !include_dir_merge_named themes
  extra_module_url:
    - /config/www/community/lovelace-card-mod/card-mod.js ```
What am I missing
crude crane
#

how can i make a theme be defaultly enabled

verbal flame
lofty remnant
#

Hi, is there an add-on that adds the ability to add text? Eg title, unfortunately the mushroom title card does not have the option to change the font color...

steep drift
#

Evening, finally giving up on the motion sensor myself, so seeking some advice 😄

i just want a list of all my sensors that have binary.motion or wat ever it is and get the sensors dynmiacally. Saves me time adding each sensor individualy,

count them, and display the number within a card..

i have NEARLY figured out , fancied doing it in node red so i can see the nodes and do a bit of coding within the node too.

i also want a timer too . so if "motion" is detected , start a 10 second timer and if motion is detected within 10 seconds the timer resets, after the 10 seconds of no motion then the state would be clear and then the count drops

delicate surge
unborn venture
sharp wren
steep drift
small osprey
#
      icon:
        - animation: |
            [[[ if (states['fan.levoit_131s_air_purifier'].state == 'on')
                return 'rotating 1s linear infinite';
            ]]]      
        - color: >
            [[[ if (states['fan.levoit_131s_air_purifier'].state == 'on') return
            'rgb(198,236,122)';
                else return 'rgb(211,211,211)';
            ]]]    

Gents, I know how to use custom_fields to merge these two codes together to make things more streamlined, but is there a way to merge them without using custom_fields? Thanks

sharp wren
leaden plaza
# small osprey ``` icon: - animation: | [[[ if (states['fan.levoit_13...

this probably works

    - animation: >
        [[[ let icon = this.shadowRoot.querySelector("#icon") 
                        ?.shadowRoot.querySelector("ha-svg-icon");
          if (states['fan.levoit_131s_air_purifier']?.state == 'off' ) {
            icon ? icon.style.color = 'rgb(198,236,122)' : ''
            return 'rotating 1s linear infinite'
          }
          else icon ? icon.style.color = 'rgb(211,211,211)' : '' ]]]
small osprey
vivid trout
#

is there a way to only show the label if state is on

maiden talon
#

In short, I am using container HA (I have to for my setup), and I'm trying to reproduce what addons do. But I can't see how to get it done with reverse proxying

#

I have to reverse proxy them with https BUT I also have to secure access if not done by HA

livid briar
#

Hi, do the recently added feature from 2023.6.0 (Added to the entity dialog: last changed) working with all devices/entities ?

for me I cant toggle to switch to relative time format (only see the absolute time). even with browser cache cleared...

tribal galleon
#

The Musroom Template Card is also usable but again, card_mod is useful. yaml type: custom:mushroom-template-card primary: Hello, {{ user }} ! secondary: '{{ states("sensor.time") }}' card_mod: style: | :host { --primary-text-color: red; --secondary-text-color: red; --ha-card-background: transparent; --ha-card-border-width: 0; text-align: center; --card-primary-font-size: 26px !important; --card-secondary-font-size: 18px !important; }

small osprey
shy comet
#

Could someone explain to me how to use the navigate card with UI minimalist? I'm trying add a navigate card on my bedroom page, bedroom.yaml, to a separate page that controls the TV, bedroom_remote.yaml. Setting the navigate path to the bedroom remote page takes me right back to the home.yaml page I have setup. Any suggestions

sharp wren
#
tap_action:
      action: navigate
      navigation_path: /lovelace-your-page-name
#

Oh wait nevermind ui minimalist uses different options for that card

fading otter
#

Lovelance banner 🙂 How do I change the text color in the heading

'''type: custom:banner-card
row_size: 3
background: '#B0C2ED'
heading:

  • 🚿
  • Bathroom
    link: /lovelace/living_room
    entities:
  • entity: sensor.wavin_temp_badevaerelse_sovevaerelse
    name: Temp
  • entity: binary_sensor.badevaerelse_sovevaerelse_microphone
    name: Temp
  • entity: light.badevaerelse
    name: Light
sharp wren
#

It should just be a matter of getting the syntax right

tribal galleon
small osprey
#

Im still new to HA. I cant figure out why my cards are just vertically centered in the middle of the page. Can someone please shed some light?

prime narwhal
#

any way to make sensor card display a certain number of decimal places?

tribal galleon
prime narwhal
#

I've been using HA for a years, and just put up with not understanding layouts, until this week, now I'm learning it finally.

small osprey
#

oh ok

#

i figured out

#

thanks a lot for pointing me to the right direction

#

i changed to view type to Horizontal

small osprey
prime narwhal
#

Lots of people here can help you, if you have the right attitude.

#

I have 30+ years of computers/IT, but was never a frontend guy

tribal galleon
#

You may still have an issue where, as you add more cards, they'll scroll to the side. May not be what you're looking for. Consider Panel layout if that happens.

small osprey
prime narwhal
#

I find it easiest to use either panel or sidebar, and put in vertical or horizontal "blocks" into it, and the cards in there...

#

for example

tribal galleon
small osprey
#

ok, i think it's still early on that front since i'm still trying to learn how to setup the cards i want

#

maybe once I have all the cards I want setup, then I will revert back to fix the dashboard. Especially, I use HA on my cellphone a lot, so I'm not too sure how one dashboard resolution can coexist between desktop and a small cellphone screen

small osprey
prime narwhal
#

You can go into code-edit mode to get the yaml, then cut/paste it between dashboards/views.

#

That way you can play in an experimental dashboard, not not f**k up your real one

small osprey
prime narwhal
#

Good luck, and have fun!

small osprey
#

thank you

tribal galleon
# prime narwhal any way to make sensor card display a certain number of decimal places?

The sensor card may not have the flexibility to display the numbers how you want to see them. You might consider making a template sensor to show the value how you want. For example, ```yaml
sensor:

  • platform: template
    sensors:
    entry_temperature:
    friendly_name: "Entry temperature"
    unit_of_measurement: '°C'
    value_template: "{{ states('sensor.entry_motion_sensor_temperature')|int }}"
    will create a sensor but show only whole numbers. This one rounds to 5 decimal places.yaml
    template:
  • sensor:
    • name: Daily Miles Utility
      state: "{{ states('input_number.daily_miles_utility') | float(0) | round(5) }}"```
prime narwhal
#

Boo. I thought that might be the case.

#

Got too many template sensors already 🙂

tribal galleon
#

Using a different card might allow you to simply format the value within the card. One that I use: yaml - type: custom:button-card entity: sensor.bedroom_temperature name: '[[[ return parseFloat(entity.state).toFixed(1) + "°F" ]]]'

prime narwhal
#

👀

#

If I addd cards (that are working fine on the energy dashboard) to a different dashboard, is it normal for them to be broken? do they need to wait for new stats run?
eg https://www.home-assistant.io/dashboards/energy/
type: energy-devices-graph

#

that one worked, but the type: energy-usage-graph didn't

tribal galleon
#

I'm not sure. I don't use Energy. I don't image that would be an issue.

small osprey
#

gents, is it just me or ..? Whenever I'm on edit mode of my dashboard on Chrome, the browser consumes like 1.5GB of ram and edit mode gets extremely slow. I oftentimes have to close and reopen the browser.

jagged dew
#

Struggling a little bit with conditional icon colors and mushroom cards. Any ideas? Thanks!
type: custom:mushroom-entity-card entity: sensor.alice_office_window_battery fill_container: false primary_info: name secondary_info: state layout: vertical icon_color: |- {% if state == "Good" %} green {% else %} red {% endif %}

tribal galleon
# jagged dew Struggling a little bit with conditional icon colors and mushroom cards. Any id...

I think you have to use the custom:mushroom-template-card in order to get some of that customization. yaml type: custom:mushroom-template-card entity: person.derek fill_container: false primary: '{{ entity }}' secondary: '{{ states(entity) }}' layout: vertical icon: mdi:check icon_color: |- {% if states(entity) == "home" %} green {% else %} red {% endif %}Tip: You can also define a different entity by placing it in quotes. For example, {% if states("sensor.some_other_entity") == "on" %}

tribal galleon
#

You can probably get it to work with card mod. I was starting to figure out some of it but ran out of time; gotta get to work. (Had to remove primary, secondary, layout, and icon for this code paste, but they're the same as above.) yaml type: custom:mushroom-entity-card entity: person.derek card_mod: style: | :host { --mush-icon-size: 60px; --card-primary-font-size: 30px !important; --card-secondary-font-size: 10px !important; } mushroom-shape-icon { --shape-color: red !important; --shape-color-disabled: none !important;} }

mild pike
#

i just did a big update from 2022.12.8 to 2023.6.1...the new dialog for switches is kinda awful. i've already got a toggle in the entity group i'm clicking on, why would i want a larger toggle to be the only thing i can see when i click to open it up? is there a way to make the history tab be the default?

jagged dew
tribal galleon
#

@jagged dew yaml secondary: '{{ state_attr(entity, "friendly_name") }}'

indigo scarab
#

Hi Everyone, I have an issue---> when I modify /src/html/index.html.template, it doesn't update and I notice the watcher doesn't detect any change, how could I update this file? (do I need to rebuild) -> when I change a component it detects changes but it takes like 17 minutes to compile, any idea how to change the /src/html/index.html.template and it gets updated or how to improve build time when I change a component file?

carmine fern
#

I've got an AC I control via an IR remote connected to HA. No native integration at all - just scripts to activate certain IR codes to change temp. I want to be able to set some sort of slider card that triggers the corresponding temperature IR code depending on the slider position. So basically I just need to set min/max values for the slider and have it report current state. From there I can rig up automations depending on current state value. Anyone able to point me in the correct direction?

golden mistBOT
#

@tribal turtle I converted your message into a file since it's above 15 lines :+1:

shrewd surge
#

Hello everyone, is it possible to get a card or something that acts like a remote for kodi? What I am looking to do is have a page that displays my movies so I can just tap on it to play on my tv. I know I can browse from the media player but the idea is to just have it ready without having to do like 4 taps to get there.

acoustic ore
#

Looking for help to clean this up

See https://github.com/thomasloven/lovelace-card-mod#performance-improvements ```
I have this in my config however it still give the error. I got the path from when installin with HACS that is what pops up

```frontend:
  themes: !include_dir_merge_named themes
  extra_module_url:
    - /config/www/community/lovelace-card-mod/card-mod.js ```

What am I missing
broken marsh
#

When browsing pictures in the Media Browser, is there really no Next and Previous button or is something buggy on my end?

acoustic ore
#

thanks for the input however having it configured like it is, doesn't work

dark dirge
#

How doesn't it work?

#

It's clearly being loaded

acoustic ore
#

I removed it from the reference and tryed just from the frontend settings and I get

#

I must not have the path correct... I used the mod to but some boxes around the buttons and there are no boxes now

dark dirge
#

Right

acoustic ore
#

How do I know what the path should be?

shrewd surge
#

can anyone help me get the animated background thing working? I cannot for the life of me figure it out.

acoustic ore
dark dirge
#

'/local/community/...,' or '/hacsfiles/....' if you installed via HACS

#

Just like any other resource

#

It tells you what to use in the docs

#

At that link

lyric prairie
dark dirge
#

That is not true

#

While card-mod can be installed as a lovelace resource, some functionality will benefit greatly from it being installed as a frontend module instead.

#

Note the 'instead'

#

I don't have it as a resource and it works fine

lyric prairie
#

Oh wow never noticed that haha😅

acoustic ore
#

yeah that's what I was going by the 'instead'. I installed via HACS and I have tried

/www/community/lovelace-card-mod/card-mod.js 
/local/community/lovelace-card-mod/card-mod.js
/config/www/community/lovelace-card-mod/card-mod.js
/hacsfiles/lovelace-card-mod/card-mod.js```
and none of these work. I obvoiusly don't understand how that path works
#

and it is installed in the location above in the screen shot

dark dirge
#

It was clearly being loaded based on your very first log message

#

No need to try random things. Whatever you did there was correct

verbal flame
#

Hey,

how can i set a off state icon color in a mushroom light card?

acoustic ore
#

the first one had it as a resource

dark dirge
#

Use the same path

#

Remove the resource

#

No more random things

acoustic ore
#

WTF, I've done that more than once, I am sure. It works now. Thank you for your help.

dark dirge
#

it was probably your browser cache

#

which you should always clear whenever you chagne something in the frontend or see weird behavior

acoustic ore
#

Thanks again for your help.

maiden talon
tribal galleon
# tribal turtle
state:
  - value: 'on'
    entity_picture: /local/images/servers/proxmox_yellow.png
    state_display: Connected
  - value: 'on'
    operator: '!='
    entity_picture: /local/images/servers/proxmox_blue.png
    state_display: Disconnected
    styles:
      state:
        - color: yellow```I set the second option to "not equal to on" so that should catch other states such as unavailable or unknown. 
You can also apply `styles:` to each state. 
Also, consider templating your card so you don't have to repeat lines for each card such as your entire style section. https://github.com/custom-cards/button-card#configuration-templates You can even use variables to be referenced and cut down on duplicate code even more. (Template `state:` but use variables for the entity_pictures so you only have to define those in each card. Two lines compared to eleven lines, as shown above.)
ashen creek
#

Hi all, after (hopefully successful) upgrade to 2023.6.1 I’ve noticed that Sun panel is missing in default dashboard (“Overview”). I’ve tried re-adding, nothing… Does anyone has a same issue? Thanks!

verbal flame
#

Hey there,

the upper card is a tile card and the lower one a mushroom light card. Id really like the mushroom light card to look like the tile card (icon color).

How can i change the off state icon color of the mushroom light card?

tribal turtle
golden mistBOT
#

@tribal turtle I converted your message into a file since it's above 15 lines :+1:

tribal turtle
#

Template

button_card_templates:
  web_url_status:
    variables:
      friendly_name: ''
      name: ''
      url: ''
    tap_action:
      action: url
      url_path: '[[[ return variables.url ]]]'
    name: '[[[ return variables.friendly_name ]]]'
    entity: binary_sensor.port_{{ variables.name }}
    icon: mdi:server
    show_state: true
    show_entity_picture: true
    state:
      - value: 'on'
        entity_picture: /local/images/servers/{{ variables.name }}_yellow.png
        state_display: Connected
      - value: 'on'
        operator: '!='
        entity_picture: /local/images/servers/{{ variables.name }}_blue.png
        state_display: Disconnected
    styles:
      card:
        - border-radius: 14px
        - padding-top: 20px
        - padding-bottom: 10px
      name:
        - font-size: 18px
        - color: white
        - align-self: middle
        - padding-bottom: 0px
        - padding-top: 10px
      state:
        - font-size: 13px
        - color: gray
        - padding-bottom: 15px
tribal turtle
# tribal galleon ```yaml state: - value: 'on' entity_picture: /local/images/servers/proxmox...

Not sure what I'm doing wrong with the template, but it's not working as I would expect. Does the template not support jinja?

Showing new and old grid cards for reference.

type: grid
cards:
  - type: custom:button-card
    template: web_url_status
    variables:
      name: proxmox
      friendly_name: Proxmox
      url: https://192.168.1.9:8006
  - type: custom:button-card
    tap_action:
      action: url
      url_path: https://192.168.1.9:8006
    name: Proxmox
    entity: binary_sensor.port_proxmox
    icon: mdi:server
    entity_picture: /local/images/servers/proxmox_blue.png
    show_state: true
    show_entity_picture: true
    state:
      - value: 'on'
        entity_picture: /local/images/servers/proxmox_yellow.png
        state_display: Connected
      - value: 'on'
        operator: '!='
        entity_picture: /local/images/servers/proxmox_blue.png
        state_display: Disconnected
    styles:
      card:
        - border-radius: 14px
        - padding-top: 20px
        - padding-bottom: 10px
      name:
        - font-size: 18px
        - color: white
        - align-self: middle
        - padding-bottom: 0px
        - padding-top: 10px
      state:
        - font-size: 13px
        - color: gray
        - padding-bottom: 15px
tribal galleon
#

I think your indentation is wrong starting a line 3. Just looking I think it should be ```yaml
type: grid
cards:

  • type: custom:button-card
    template: web_url_status```
tribal turtle
lyric prairie
#

You are using jinja within button-card, that is not supposed to work, all templating should be done in JavaScript

tribal galleon
#

So, I would start with copying the working Promox. No variables just yet. And ensure that the template works at that point.

lyric prairie
#
entity: binary_sensor.port_{{ variables.name }}

In JS

entity: '[[[ return "binary_sensor.port_${variables.name}"; ]]]'
#

Same holds for the entity_pictures

tribal turtle
#

awesome... thank you!

tribal galleon
#

I was thinking that may have been an issue but I wasn't sure yet.

#

I would have figured it out eventually. One of my lines has yaml name: '[[[ return variables.var_value + "%"]]]'and now this works yaml name: '[[[ return `${variables.var_value}%` ]]]'

tribal turtle
#

Still not working...

type: custom:button-card
template: web_url_status
variables:
  name: Proxmox
  name_lower: proxmox
  url: https://192.168.1.9:8006
button_card_templates:
  web_url_status:
    variables:
      name: ''
      name_lower: ''
      url: ''
    tap_action:
      action: url
      url_path: '[[[ return variables.url ]]]'
    name: '[[[ return variables.name ]]]'
    entity: '[[[ return `binary_sensor.port_${variables.name_lower}` ]]]'
    icon: mdi:server
    show_state: true
    show_entity_picture: true
    state:
      - value: 'on'
        entity_picture: >-
          [[[ return `/local/images/servers/${variables.name_lower}_yellow.png`
          ]]]
        state_display: Connected
      - value: 'on'
        operator: '!='
        entity_picture: >-
          [[[ return `/local/images/servers/${variables.name_lower}_blue.png`
          ]]]
        state_display: Disconnected
    styles:
      card:
        - border-radius: 14px
        - padding-top: 20px
        - padding-bottom: 10px
      name:
        - font-size: 18px
        - color: white
        - align-self: middle
        - padding-bottom: 0px
        - padding-top: 10px
      state:
        - font-size: 13px
        - color: gray
        - padding-bottom: 15px

HA keeps reformatting the entity_picture keys to be multiline... but still it looks equivalent to me.

tribal galleon
#

Try hard-coding each entry that has a variable to pinpoint which is causing problems. yaml type: custom:button-card template: web_url_status variables: name: Proxmox name_lower: proxmox url: https://192.168.1.9:8006 name: Proxmox Test entity: binary_sensor.port_proxmoxand so on all the way through state:. (Styles: should be okay to leave out.)
Any entries added will override the template.

tribal turtle
#

The template works if I take out any of the javascript that has string formatting. The javascript without string formatting work fine.

So it's just these 3 lines with issues.

entity: '[[[ return `binary_sensor.port_${variables.name_lower}` ]]]'
entity_picture: '[[[ return `/local/images/servers/${variables.name_lower}_yellow.png` ]]]'
entity_picture: '[[[ return `/local/images/servers/${variables.name_lower}_blue.png` ]]]'

The js seems correct to me.

#

Hardcoding entity in the card (not template) seems to work.

dark dirge
#

you're missing the trailing semicolon in each case

#

and you have two entity_picture 🤷

#

oh, for different states

tribal galleon
#

They're for separate states. Thought the trailing semicolon is only for multiline.

tribal turtle
#

Seems to be working though... maybe there's a limitation with using javascript to define the entity

tribal galleon
#

what about something like yaml "/local/images/servers/" + variables.name_lower + "_yellow.png"

tribal turtle
tribal galleon
#

maybe because the card uses the entity for some of its own coding purposes.

dark dirge
#

I've become enamored with Python syntax, unfortunately forgotten some of the nuances of C, and never have been a JS fan

lyric prairie
#

The entity key does not support templating according to the docs

#

But you can always leave it out and only use it in your ui-lovelace.yaml

type: 'custom:button-card'
entity: <your_entity>
template: web_url_status
variables:
  ....
tribal turtle
dark dirge
#

yes, it's the "statement separator" vs. "statement terminator" part that threw me

tribal turtle
#

Thanks for all the help everyone... I really appreciate it! I'm glad to learn something new and I think the templating will save me soo much copy/pasting.

prime narwhal
#

Anyone know of a good graphing card, that can plot sensors, both stacked, and a bunch or horizontal bar graphs?

#

Like the pv power, and the individual devices, on the energy dashboard?

indigo scarab
#

Hi Everyone, I have an issue---> when I modify /src/html/index.html.template, it doesn't update and I notice the watcher doesn't detect any change, how could I update this file? (do I need to rebuild) -> when I change a component it detects changes but it takes like 17 minutes to compile, any idea how to change the /src/html/index.html.template and it gets updated or how to improve build time when I change a component file?

sour condor
#

Anyone know if possible to cycle through several dash board subviews on a timer when streaming to chromecast?

dire heron
#

Is there a way to build a custom dashboard, be it with the HomePanel add-on or something, where you can limit a users access of what they can see & control, using a different username/password and/or IP address? When we have guests stay with us, they have their own bedroom, so I want them to access control of the lights, fans, TV, etc. in their room and the “shared” spaces like the kitchen, dining room, living room, etc., but not be able to access the other bedrooms, security cameras, etc. I know I can easily build a dashboard only showing the stuff I want, but don’t know how to limit them to only SEEING said dashboard(s).

void salmon
#

How can I get the text value of a sensor state to display as a name on a card? I'm trying this with no luck: name: {{ state('sensor.fire_rating_text') }}

prime narwhal
#

Try with double quotes around it? But it's probably not supported.

void salmon
#

doesnt work. With double quotes it displays that state code

prime narwhal
#

Yeah, looks like it's not evaluated as a template.

dark dirge
#

It depends entirely on the card

#

Most cards do not support templates

void salmon
#

makes sense. Thk you

broken marsh
#

Is there a way to browse through images in "My media" without clicking one picture, closing it and opening the next? Like a keyboard shortcut to next image or something.

marsh gull
#

Hi. I'm new to HA and this is doing my head in.. I have a RM4pro and have managed to learn all the IR/RF commands for my devices. There's one snag though.
I have a ceiling fan that has separate buttons for light_on/light_off. How on this great green earth can i make a card switch to toggle the light?! I can't figure it out. Nothing i try works in the code editor.

golden mistBOT
#

@marsh gull I converted your message into a file since it's above 15 lines :+1:

#

@marsh gull I converted your message into a file since it's above 15 lines :+1:

marsh gull
#

or is this something i should be creating a script/automation for and 'calling' it differently

tribal galleon
# marsh gull or is this something i should be creating a script/automation for and 'calling' ...

I think what you'll end up having to do is creating an input_boolean/toggle helper to "act" as your fan being on or off. I think you'll need an automation to check the status of the helper, sending the appropriate code, and then toggling the helper.
Then, you can work it into your dashboard. Tap_action to call the automation and getting the state of the helper for your state styling (like colors or animations). (Consider, a hold_action just to toggle the helper in order to keep the fan and helper in sync.)

#

Technically, you could incorporate the "automation" portion into the card, but that could be a more advanced approach.

carmine fern
#

I've got a strange issue with browser_mod not displaying cards. I've got a button card set to fire-dom-event on tap and call browser_mod.popup with the below contents. Weird thing is, when the button is pressed, the popup shows but is blank except for the input select. I've tried removing the vertical stack so it's just the input select and the grid but it still just shows the input select and nothing else.

#

And if I remove the button that calls browser mod the card shows fine with the grid and the input select.

pliant gull
#

Is it in any way possible to get the yaml code for a specific popup card? Basically what I want to try is to replicate the popup card or the "more info" popup of a light entity, the new kind. Either have some way to extract the lovelace code or an easy way how I can recreate this?

pallid zephyr
#

Is there some 'typical' thing people do on a dashboard to indicate that a frigate event occurred? Some flag to prompt you to go check the events.

vast crane
fossil heron
#

It's driving me crazy, anyone competent with Minimialist Lovelace UI?

#

I can't seem to add any custom cards

#

I always get this message

#

the file is in config/ui-lovelace-minimalist/custom_cards/custom_card_vertical_cover/custom_card_vertical_cover.yaml

lyric prairie
#

Have you reloaded the yaml files from the dev-tools?

fossil heron
#

yes, still doesn't work

#

I have a feeling that those files are not getting included at all

lyric prairie
#

You will also need to renew the dashboard with the 3 dots and select renew page

fossil heron
#

hmm, i was doing some other stuff and it started working

#

but I reloaded configs + dashboard multiple times before

#

fun stuff :(

fossil heron
#

i figured it out, apparently it was really the yaml config reload, just not lovelace one, I click all YAMLs and it works

flint orbit
#

Does anyone know if there are any ways to adjust the schedule helper intervals? Right now it is 30 minute minimum time intervals. That is a bit too large for my needs. 10 minutes would be perfect but 15 minutes will do. Is that 30 minute a hard limit or is there a way to configure the interval for the schedule helper?

golden mistBOT
#

@feral rivet I converted your message into a file since it's above 15 lines :+1:

plain pike
#

it would be displayed properly if you didn't include a message with the code btw

feral rivet
plain pike
#

lol yeah it's common tbf but code: works_like_this_too

#

just back tick the code, not the message.

#

you can just edit what you have and move the tics

feral rivet
#

morning , I am looking for any help I can get concerning this template. I have a button card that displays the state of the door and the lock via a sensor template. because I am using sensor templates the standard tap action will not function. I found this tap_action template that Petro had helped someone else with

  action: call-service
  service: |
    [[[
      return (entity.state === 'locked') ? 'lock.unlock' : 'lock.lock';
    ]]]
  service_data:
    entity_id: lock.garage_laundry_door_lock_door_lock```

    the problem I think I am having is that in Petro example the entity_id referenced back to the original entity, which is a sensor.  Here is the full card http://pastie.org/p/7uWEehpPIHNAcLYHpAO4W4
#

Petro shared this with me: if that's for custom button card then i believe you'd replace entity.state with entities['lock.garage_laundry_door_lock_door_lock'].state
it's either that or states['lock.garage_laundry_door_lock_door_lock'].state
most likely the second one

lyric prairie
#
tap_action:
  action: call-service
  service: |
    [[[
      return states['lock.garage_laundry_door_lock_door_lock'].state == 'locked' ? 'lock.unlock' : 'lock.lock';
    ]]]
  service_data:
    entity_id: lock.garage_laundry_door_lock_door_lock
#

entity.state refers indeed to the global set entity of the card

#

Also add

triggers_update: 
  - lock.garage_laundry_door_lock_door_lock`

to the card. This will rerun the template on each state change of your lock

feral rivet
lyric prairie
#

No, since it's not the main entity

feral rivet
#

okay got it

#

Do I not want to also update the sensor that really changes the card?

lyric prairie
#

No need to when it's the main entity

feral rivet
placid sedge
#

The air quality sensor from ikea is nifty look at these pretty graphs

dusty summit
#

ooo, what zigbee integration are you using?

placid sedge
#

Zigbee2mqtt

dusty summit
#

I was afraid you'd say that 😉 I was hoping for confirmation someone had got it working in the others. (for VOC. I think the pm2.5 works)

#

thanks 🙂

fiery ledge
#

what I didnt check was that you used a lock, and that doesnt have a lock.toggle service unfortunately. So you do have to use that template.....

#

just know that light, input_boolean, switch have that toggle service to make life easier 😉

hardy rivet
#

Does anyone know if there is a way to have a custom bar card, to give it your own image, to say, have a beer mug fill up or empty based on data provided to the card?

verbal flame
vernal river
#

hi 🙂 does anyone know if there is a way to update the polling rate at which a photo is loaded in lovelace via its path? i have a static image path that is being overwritten by other scripts but lovelace doesnt seem to update for several minutes to re-check the file

nimble lagoon
#

Hi team. Need some assistance with my configuration.yaml. It throws an error and im having a hard time to understand whats wrong (absolute yaml beginner). Can someone help me?

somber bison
#

You have a double frontend key in the yaml file

#

On line 6 and line 16

nimble lagoon
#

omg. Thank you. works.

hardy rivet
polar kelp
#

picture-elements and card-mod

glacial ledge
#

I have a switch that I want to convert to a light so it can have a different color icon depending on state on/off but I also want a different icon. Is this doable? 'Switch as X' only changes the entity to type light afaik.

plain pike
#

You can change icons from the card themselves

glacial ledge
#

How? Can it work with auto-entities?

tribal galleon
# glacial ledge How? Can it work with auto-entities?

Probably not easy to customize a single entity to show up a certain way with the auto-entities card. Generally, customization like you asked about is when the entity has its own card. You might consider changing the Switch to Show as Light.

#

HA will hide the switch entity and create a new light entity to replace it.

glacial ledge
#

Yes, Thanks. That's what I referred to 'Switch as X' but will not allow changing of icon. I am thinking of using template light switch. What do you think, is that too much?

tribal galleon
#

With templating, almost anything is possible. My only thoughts are controlling the switch but showing the light template through an auto-entity card. IMO, the auto-entity type cards are good for showing general information but they are designed to be customized to show specific items, not to show specific items in a certain way. (If that makes sense.)

glacial ledge
#

It does. Thats how I use it. I want the icon etc to be setup in the entity itself. The auto-entities is for showing e.g. all lights that are on., all lights in specific areas, etc...

tribal galleon
#

I get that. But what you're trying to do is that last part of what I said not to show specific items in a certain way by way of changing the icon within the card. Looking at the doc, there's not much in terms of styling that you can do with the card. Have you tried creating the light entity like suggested above?

glacial ledge
#

yes, but it won't be able to change the actual icon depending on state. Also, I like yaml better than ui.

tribal galleon
#

I use auto-entities cards to quickly toggle automations and another for input selects. But nothing in there allows me to change the icons within the card. yaml filter: include: - entity_id: input_boolean.automation* domain: input_booleanI also use custom:battery-state-cards for monitoring battery levels and availablility.```yaml
filter:
include:
- name: entity_id
value: sensor._power
- name: entity_id
value: sensor._battery_level
exclude:

  • name: state
    operator: '>='
    value: 50```
#

@glacial ledge Start a thread and post some screenshots of what you're working with. Maybe something can be figured out. (I even have an auto entities card that shows custom:button-cards that are customizable... But this may not even have the level of customization that you're looking for as with will create the buttons with the same styling.)

fossil heron
#

is it possible to make a "grid" with two columns where for example 1 item takes 1/3 of width and second one 2/3

tribal galleon
fossil heron
#

thanks this is what I needed

vernal river
#

hey i just set up a Kodi media library and now in the media player tab i no longer have any media_player entity source controls... ive restarted HA and didnt fix it. any idea?

#

i thought might had been the extra /browser in the URL but removing it gives me an error message - also i can call media_player as a service to play media on automations / direct from the entities list. just no longer shows source select + controls on the 'Media' tab

lime glacier
#

it disappeared with 2023.6, I upgraded to 2023.6.2 and still no dice

#

this is in my osx media player app, just stuck on the youtubemusic player integration I have installed.. but then in my chrome browser:

#

glad its not just me now. 🙂

vernal river
lime glacier
#

I am seeing if I Can replicate

#

yeah, nah..... it just doesn't work for me.

#

I can only terst OSX, but chrome/firefox/safari, no media player list.

#

I tested locally and externally (externally I have cloudflare CDN)

#

Could it be some FE card breaking it? Do you have HACS FE modules installed?

vernal river
#

inspector on broken browsers shows code to be non-existent to what is shown on one of my working ones. (this is linux firefox). so idk 🤷‍♂️

vernal river
lime glacier
#

yeah, same but I don't have any of those

#

I can not find any forum post about this

vernal river
#

idk, i even removed the kodi integration and still broke, gonna do a restore from 2 days ago and hope it doesnt happen again lol

lime glacier
#

yeah, I didn't add or remove any integration

#

it just disappeared with 2023.6

hardy rivet
#

How do I resize the image in a picture-elements card?
The image is 131x255 which is the size I want it, but it loads GIANT. More like 600x1000

inland token
#

Is there any documentation on the media player states? Looks like it’s an enumeration

#

Playing/paused/etc

dark dirge
#

But states are ultimately determined by the integration providing the entity

inland token
#

Struggling to make a custom button card respond to changes in state. I tried JavaScript, but not nowhere. Trying this now with no luck:

#

state:

#

-value: “paused”
operator: ‘=‘

#

icon: mid:play-pause

#

I was thinking the value was a number, but it appears to be a string

#

Should I be using state in yaml or referring to state in JavaScript?

dark dirge
#

Whatever you want

#

Your little unformatted snippet isn't enough to say anything about your attempt

inland token
#

Both should work? How do I refer to state in JavaScript?

golden mistBOT
#

@inland token I converted your message into a file since it's above 15 lines :+1:

inland token
#

Here's my full attempt

#

I get lost and just guess because there seems to be no documentation. For example: none, single or double quotes around the strings? is the equality operator = or == ?

dark dirge
inland token
#

How did you get to it? Where do you start

dark dirge
#

I seearched for "home assistant custom button card" in Google

#

first link

#

where did you look?

inland token
#

Home assistant documentation - media player

dark dirge
#

it's a custom card

#

it won't be anywhere in teh official docs, and definitely not under "media player"

#

that's an integration

#

you had to have installed it from somewhere, and the docs were there

inland token
#

Ok, so each button is completely different in syntax and rules?

#

I fugured there was a standard

dark dirge
#

each card can do whatever it wants

#

again, you're using a custom card, which some random dude wrote and made available

inland token
#

Gotcha. No wonder it's so confusing. 50 different sets of rules fo r 50 different buttons

dark dirge
#

you keep saying "buttons"

#

I think you mean "cards"

#

but if you look through them, you will find consistency

#

the real point is - follow the documentation for what you're using

golden mistBOT
#

@inland token I converted your message into a file since it's above 15 lines :+1:

inland token
#

This gives me teh word "playing" for the name, but fails to set any icon

dark dirge
#

I suspect it's because you have this:
icon: null

#

what's that for?

#

it probably overrides the other part

inland token
#

Took out the whole line. No change

#

It appears to ignore anything I set for either state. Maybe it only works for certain object types like lights?

#

Thanks for your help. It looks like this functionality of the card is broken.

tribal galleon
#

@inland token yaml icon: | [[[ if (entity.state == "playing") return 'mdi:play'; if (entity.state == "paused") return 'mdi:play-pause'; else return 'mdi:stop'; ]]]

inland token
#

I just got it going. That's what I resorted to. It looks like the state: functionality is broken

#

Thanks!

#

I see people give examples like this. I assume you mean: states['media_player.living_room'].state == 'playing', since your example will not work

tribal galleon
#

It's not that it is broken. Think it has issues with the media_player entity.

inland token
#

Maybe a different version of the card works with your syntax?

tribal galleon
#

It does work. The custom:button-card can use the entity as a variable.

inland token
#

How is that different from entity_id ? That's what I have been using

tribal galleon
#

Not all cards can refer back to the entity: like this card can. The syntax you used also works, but, more importantly, it can be useful when you want to find a start of a different entity. yaml type: custom:button-card entity: light.bedroom1 name: Bedroom1 color: auto icon: | [[[ if (states['input_boolean.tester'].state == "on") return 'phu:ikea-blind-closed'; if (states['input_boolean.tester'].state == "off") return 'phu:ikea-blind-open'; ]]]

inland token
#

it does work! I tried for days to get other examples to work, and just gave up & found the other way from experimentation.

#

I just assumed that syntax only worked for teh pre-lovelace cards, whatever they were called

tribal galleon
#

The preloaded cards have the minimal customizations available to them (without using card-mod). They're good for basic stuff but not much more, IMO.

plain pike
#

I thought lovelace wasn't a thing anymore

inland token
#

Not sure. I though that all the current cards were called lovelace. & there was some legacy thing before that. Just started with HA a few weeks ago.

#

It seems like it's a bunch of stuff cobbled together. There's YAML, javascript, some weird variant of JavaScript nobody's every heard of, and at least 2 other languages

#

Today's lesson for me is taht every card can have a different language, rules, and syntax.

tribal galleon
#

Again, like RobC mentioned, those are custom cards.

inland token
#

From github, it looks like you write cards in Microsoft Visual Studio using typescript, yet another language.

tribal galleon
#

The custom:button-card:

prime narwhal
#

Is there any way to show the value of an input-number helper in an entities card without it being editable?

  - type: entities
    entities:
      - entity: sensor.electricity_tariff
        icon: mdi:calendar-alert-outline
      - entity: sensor.current_electricity_rate
        icon: mdi:currency-usd
      - entity: sensor.local_consumption
        icon: mdi:solar-power-variant-outline
      - entity: input_number.electricity_daily_charge
inland token
#

So they wrote that card in 2 different languages?

#

Guessing some cards are in perl, python, c++ etc?

dark dirge
#

and no, TypeScript is a strongly typed "version" of Javascript that is compiled into regular Javascript

craggy orchid
#

with a Mushroom picture-entity card, is there a way to open up the camera entity for a tap action?
Currently I specify my entity to be an MQTT based sensor for motion and hte camera entity specifies the actual camera. So when clicking on it, rather than to open the MQTT snesor "more info", I would rather enlarge to live feed of the camera

nimble lagoon
#

Hi there. I have created 2 scenes which controll a certain amount of lights at once. One to turn them on and one to turn them off. On my dashboard I just want to have 1 toggle buttonm to turn them on and off. Im using dwains dashboard. Any hint on how to do that?

lyric prairie
#

You can create a input_boolean and use that in an automation to toggle the scripts with a choose action based on the state of the boolean

nimble lagoon
#

that easy. awesome man. that works

dusty summit
#

input booleans (toggle helpers) and input buttons are great 🙂 especially as you can do things like expose booleans to alexa, and use that to control things HA can't touch. (frelling kasa plug which turned off local control, but still worked through alexa.)

harsh carbon
#

I'm trying to have a view with 3 columns

#

however the other grid goes below for some reason rather than going to the right

#

is there any way to force it to the right

lyric prairie
#

The default masonry layout is hard to control. You could try a horizontal stack with 3 vertical stacks inside for each column. Or look into custom options like lay-out card

harsh carbon
lyric prairie
#

Set the dashboard to panel mode (1 card)

harsh carbon
#

ty ill try

#

eh looks a bit bad

#

ig i coudl try lay-out card

#

is it easy to do what im doing with that

#

I don't see a Layout Options button when using lay-out card

lyric prairie
#

You will need the grid layout

harsh carbon
#

yep

#

ive done that

#

how would i make it do 3 columns

#

with grid layout

#

alr got a solution rn

inland token
#

Starting with HA, I figured out last need that there is a big icon library called MDI. Are there other icon libraries installed? To some integrations add their own? Is there a way to browse what I have?

#

PS - I hate autocorrect

tribal galleon
#

Not exactly answering your questions here but some useful info: When I'm trying to figure out what Material Design Icon I want to use, I visit https://pictogrammers.com/library/mdi/. The search and categories are helpful.
You can install more icons, if you want. For example, I like this set call custom-brand-icons (available through HACS) that has some cool icons and frequent updates. https://github.com/elax46/custom-brand-icons

inland token
#

Thanks

plain storm
#

Hey folks. I'm not sure if frontend is the right place; but I can't load the media player tab/page. It's throwing unhandled promise errors in the browser console. And complaining about "TypeError" and "this.hass.entities[e.entity_id] is undefined". I'm guessing a media player has disappeared or something, but how do I fix it? I don't see any dodgy entities in config

#

or more accurately, the page opens and I can browse through the media, but the media bar won't load at hte bottom

#

ha-bar-media-player.ts is where the error is coming from

tribal galleon
plain storm
tribal galleon
warm bolt
#

Having an issue where the frontend says card doesn't exist l, but the card does exist and it's loading via resources. It seems to only happen the first time before (eg when the js isn't cached). Basically I think the frontend is loading and attempting to load the card before all of the js resources are loaded. Any solutions for this?

tribal galleon
warm bolt
#

Yep. That just seemed hacky

#

Thinking about making an addon to monitor hacs for js files and then auto webpack into a single large bundle

tribal galleon
#

Agreed. In my case it is just a timing thing. The dashboard refreshes before some integrations are loaded, namely, Frigate. Sometimes, custom:button-card hasn't had a chance to load so my dashboard is just full of errors.

warm bolt
#

Yeah. Seems similar

#

Wondering if I could bundle all the js into a single... If that would work or would make it worse because it would load slower sure to the size...

#

Seems like the frontend souls wait for resources to be all loaded before it displays

#

Maybe I'll whip up something using uglify and see

tribal galleon
#

Actually, now that I'm using custom:layout-card, my dashboard is just one giant error message. (Just updated Core.)

warm bolt
#

Built a quick addon to do it. .. takes the list of js modules to combine and then uses Inotify to watch them and then runs uglify and gzip on them.... Just need to see if that's better or worse .. but the whole gzip is 8mb uncompressed and 2 compressed

rocky hinge
#

anyone know how I can get the icon to span the entire card? (button-card)

meager vortex
#

Is it possible to convert the history to a graph?

vast crane
#

Yes, you need to assign a unit_of_measurement to the sensor. Doesn't matter what unit you choose.

#

@meager vortex

oblique wind
#

What does the offset do?

oblique wind
#

Thanks

vast crane
#

If you click that (?) on the right side of the page it will take you there.

oblique wind
#

Thanks

sinful prairie
#

Hi, I've noticed a bug in the frontend and found an issue about that on github but it has been "locked and limited conversation to collaborators" a year ago, should I create a new issue, maybe referencing the old one or is there a reason why it has been locked?

vast crane
sinful prairie
#

thanks

full topaz
#

Is there a way I could use HTTP / Fail 2 ban to ban a whole subnet?

carmine fern
#

Can someone tell me what I'm doing wrong here? Trying to control a Shield TV remote with some buttons. Have this set but when tapping it shows "Failed to call service remote/send_command. required key not provided @ data['command']"

tap_action:
  action: call-service
  service: remote.send_command
  data:
    command: DPAD_RIGHT
  target:
    entity_id: remote.shield_lounge
urban birch
#

greetings! is there a way to change the display of light switches and other items to default to using the history bar with on and off cycles on the bar? I prefer that over just seeing a big switch for the entity.

fiery ledge
#

otherwise I wouldnt understand wht this is happening

vast crane
carmine fern
# vast crane Looks right to me... Maybe test it in devtools and see what happens?

That's the weird thing - I pulled the config from dev tools and tested it just perfectly fine in dev tools. It's like it wants to work fine when not called from Lovelace but when called from inside Lovelace it just fails for no good reason. I thought maybe because it was inside a browser_mod popup it may be failing but even creating a single button card (the default one, not the custom one) with nothing but a single tap action it's failing. Wondering if I need to submit a bug report or something.

golden mistBOT
#

@carmine fern I converted your message into a file since it's above 15 lines :+1:

vast crane
#

I'd probably try disabling all your mods and try it. I feel like I've seen similar issues before related to mods, though I don't recall all the exact details. That yaml works fine for me.

muted sequoia
#

someone have tha same promel, that if I click on add helper,nothink happens

golden mistBOT
#

@pallid zephyr I converted your message into a file since it's above 15 lines :+1:

pallid zephyr
#

It's gonna be the damn dashes again, I can't seem to get the hang of them.

tribal galleon
muted sequoia
native coyote
#

Is anyone aware of a way to render the content of the newer entity dialogs as a card on a dashboard (a light dialog specifically, if that matters)?

prime narwhal
#

How to make dashboards device (width) sensitive? My dashboard doesn't work on iphone because the cards are too narrow and cut off all the text...

vapid field
#

Hi, I‘m using the markdown card with text plus a value from a weather entity. As Example: ‚Das Wetter ist: {{ states('weather.dwd_weather_yourcity') }}‘ I expected ‚sonnig‘ but get ‚sunny‘
So the value here is not in my language but in other cards like entity card it is. Is there a way to change it?

carmine fern
modern plume
#

can anyone recommend a way to have three date-time pickers in a single row? Can I, for instance, have them as buttons that open a picker?

urban birch
#

greetings! is there a way to change the display of light switches and other items to default to using the history bar with on and off cycles on the bar when clicking on a switch or light badge? I prefer that over just seeing a big switch for the entity.
Thanks!

granite knoll
#

anyone know why or how to prevent HA from constantly reverting to the default dashboard instead of the one I select and set to default [about 10 times a month]?

inland token
#

Want a card button to say something. I would love to “read the docs,” but have no idea where to look. I discovered “cloud say.” How do I specify which voice I want to use? Working button card so far:

show_name: true
show_icon: true
type: button
entity: media_player.living_room
tap_action:
action: call-service
service: tts.cloud_say
target: {}
data:
cache: false
entity_id: media_player.living_room
message: This is a test
show_state: true
name: Hello
icon: mdi:account-voice

#

I get “read the docs” with links to random places. I’m not sure how you find these places. Should I be looking in the HA docs, some GitHub repository? Am I looking up docs on the button, media player, or cloud_say?

#

I tried voice: xyz. And just get an error that I am including an extra parameter

#

My thought process so far: I guess it’s built into HA, so it should be in the HA docs. Looked and discovered nothing about cloud_say. Googled cloud_say. and found links related to Alexa and something called Nabu. Don’t think either is related, but unsure how to determine if they are or not. I’m not using an Alexa.

inland token
#

My thought process so far: I guess it’s built into HA, so it should be in the HA docs. Looked and discovered nothing about cloud_say. Googled cloud_say. and found links related to Alexa and something called Nabu. Don’t think either is related, but unsure how to determine if they are or not. I’m not using an Alexa.

dark dirge
#

first link from my Google

#

"something called Nabu" is Nabu Casa, which is the organization created by the HA founders

inland token
#

Ok, so I guess my first question is how you know this, or how I should have been able to figure it out on my own. I tapped on a media player card and accidentally discovered text to speech in the “sources” section.

#

Second question would be how you are supposed to specify which voice to use. The link you gave only has a “gender” option

#

If I want to use the “JennyNeural” voice, for example

dark dirge
#

I literally Googled "home assistant cloud_say"

inland token
#

I did the same. I got the link you gave me. It’s either wrong or outdated, because there is no mention of voices, so I didn’t know if it was the same thing, an older version, or just shared some common code history.

dark dirge
#

well, that was a pain in the ass

#
service: tts.cloud_say
data:
  entity_id: media_player.fr_gh
  message: Hi!
  options:
    voice: JennyNeural
#

I don't know if that's actually documented anywhere

#

which voices you can use with which languages, that is

#

and the NabuCasa docs don't mention "voice" as an option, so yes, I would say that they're lacking.

#

these are the available options:

                gender=options.get(ATTR_GENDER),
                voice=options.get(ATTR_VOICE),
                output=options[ATTR_AUDIO_OUTPUT],
inland token
#

Wow! Thanks! I guess that I shouldn’t feel like I’m overlooking the obvious. It really does require a lot of digging and trial.

dark dirge
#

maybe it's documented somewhere, but I couldn't find it

cloud oriole
#

So when you have a sensor card, and you tap on it and get the nice graph with the blue line and what looks to be period min / max shading..... How can I recreate that graph to show it on a dashboard?

vast crane
#

That's a statistics graph. You can add a statistics graph card.

cloud oriole
#

how do I get it to look the same though?

#

oh - I tried it again and it actually comes up the same now - not with just different lines......

#

before the min / max ones weren't a shaded region, just additional lines.

#

thats much nicer than the yellow one lol

tribal galleon
#

I've posted this example before. Custom:button-cards templated for my motion detectors. Tonight, I added battery status indicators. Adds 18 lines to the template but uses a variable for the battery_level entity so each card has only an extra two lines. (The cards are subdued when clear; flash when detected.)
Dashboard's YAML: https://pastebin.com/gaFmay1B
Motion Detector Template Line 295
Generic Custom Template Line 78
Usage example at Line 5539

formal citrus
#

Where's the best tutorial on how to create a new card type?

#

Looking to create a 2d slider for my elgato key lights (brightness vs temperature)

dark dirge
carmine fern
mystic timber
#

Heyo

Is there a way to change the icon color of the Turn On All Lights button to yellow all the time? been struggling to do so
http://pastie.org/p/5LMb5ksAZRa5KzP3Phx6jT
(line 25 is the turn on all lights button)

carmine fern
golden mistBOT
#

@mystic timber I converted your message into a file since it's above 15 lines :+1:

tribal galleon
#

Heyo

pallid zephyr
#

This is maddening. Sometimes it says "Custom element doesn't exist: grid-layout", sometimes it works fine. How can a thing be defined 'sometimes'?

lament ridge
dark dirge
#

You can also select Edit from your profile page

lament ridge
dark dirge
#

Yes

#

You press Home Assistant

lament ridge
formal citrus
#

started working on some designs, gonna build these components next

bitter bolt
#

is there any way to hide icons on the left sidebar? there used to be a custom-sidebar integration but it's deprecated now due to being nonfunctional.

dark dirge
bitter bolt
#

is there any way to do it system-wide and not per profile?

tribal galleon
#

It is per dashboard but you can configure it for different users (hidden for the "tablet" user but not hidden for me) or just leave it default. Can also hide the header and various other buttons.

bitter bolt
#

ty

inland token
#

Not sure if this is a template or a card question. It seems HA has something called templates to build strings. If I want a card to use tts to say the weather, how do I reference this string? Building the string in the template editor is pretty easy.

dark dirge
#

Write a script with the tts call with whatever message you want, and call that from whatever card you want

inland token
#

Tried that.

#

message: "Temperature is {{states('sensor.temperature')}}."

#

It literally says “temperature is states sensor dot temperature”

#

show_name: true
show_icon: true
type: button
entity: media_player.living_room
tap_action:
action: call-service
service: tts.cloud_say
target: {}
data:
entity_id: media_player.living_room
message: "Temperature is {{states('sensor.temperature')}}."
options:
voice: CoraNeural
show_state: true
icon: mdi:account-voice
name: Test

#

I understand that once working, I need to specify which sensor. Do they only work with certain card types?

dark dirge
#

I said: write a script and call it from the card

#

Most cards do not support templates

#

If they don't say they do, they don't

inland token
#

Oh, ok. So you use these templates in scripts?

#

Template = string builder for scripts?

dark dirge
#

They're not just one thing

#

That is one place

azure wind
#

Morning all, not sure if this would be the correct place but i would like to make an icon suggestion. could we get numbered garage icons as more often than not we have more than one garage and up till now i have just named them differently but it would be ideal to have a method of identifying them just with the icon so that as an example on the watch app i can tell the difference.

carmine fern
#

Fuck off

#

On another note, does anyone know of any way to display a Google Maps route via an image card or similar? Obviously would need to call via Google's API but basically want to have an image card showing the best route between A and B.

#

Does this look like your personal advertising space? Get lost and go pilfer your wares elsewhere.

#

You knew exactly what you were doing. You joined a specific Discord for a specific topic, found a channel name that most closely resembled something related to Shopify page development and then spammed your crap.

cobalt vale
#

I have a question regarding dashboards and websites. I know, you can embed websites with iFrames into your dashboard. But is there also a way to show websites, that block iframes? Imagine a browser inside of a lovelace dashboard in kiosk mode. Does someone knows something about that?

formal tide
#

Maybe there‘s a reason these sites don‘t work in iframes?

#

In essence you want a traditional Html <frameset>. But this is not going to happen in lovelace nono

indigo valley
#

Hey everyone. I would like to have some GUI where I (or, more general, HA administrators) can configure devices to be automatically switched on/off depending on the solar energy excess. Currently, this can only be done using (very redundantly...) automations, I would like to provide a much more fancy GUI for that. But no idea how to start with adding such a thing in HA. It's more like just a card, maybe a dashboard? But... how to approach?

#

I'm familiar with HA integration development, but currently lack knowledge of frontend development. Some first hints would be great, thanks!

#

What I basically want to create is some kind of list of entries, where a user can add entities (e.g., switches, light, climate devices, e.g.) in a certain priority, defining their estimated energy consumption etc... On the backend side, as soon as enough energy for the device with the highest priority is available, this gets switched on. Then the second, etc.... and reverse, if there is a lack of energy. But no idea how to create a nice GUI for that in HA, involving a list (table) of already configured devices and their status, and a dialog to create/modify the parameters (priority, required energy, etc.) for these devices. Any hint?

cold crypt
#

Hi, since a few weeks (I am not sure if it came with an update) I am having problems with the UI. It hangs really often and is only getting healthy again after a reload. It happens on the Website (via browser) and also with the mobile app.
is there a known bug?

glass ibex
#

Is it possible to use a template for a picture url?
I have a input_text helper that separates several URLs and want to use a random value for a picture card.

I don't get this to work, but I do get a url when I use it in a markdown card for example.

  • type: picture
    image: >-
    {% set values = states('input_text.text_sensor').split(',') %}
    {{ values|random }}

Markdown that works:
type: markdown
content: |
{% set values = states('input_text.text_sensor').split(',') %}
{{ values|random }}

lyric prairie
#

Most cards do not support templating or it is mentioned in the docs.
The picture card doesn't mention templating, so probably doesn't support it.
Markdown is one of the few cards that supports templating

glass ibex
#

Power consumption control

tribal galleon
#

@glass ibex The stock cards, like @lyric prairie mentioned, offer a limited ability to customize the card. Consider, the custom:button-card https://github.com/custom-cards/button-card and the Mushroom card https://github.com/piitaya/lovelace-mushroom.
They are very customizable, but have a learning curve. The syntax is different between the two but concepts are the same. You can find a lot of examples here: https://community.home-assistant.io/t/fun-with-custom-button-card/238450 and https://community.home-assistant.io/t/mushroom-cards-build-a-beautiful-dashboard-easily/388590

lofty remnant
#

Hi, can I somehow install this on my homeassistant version?

plain pike
simple ridge
#

@plain pike Is that only with the nabu casa though?

#

not the duckdns method as I am using

plain pike
#

that's in HA, regardless of the method you use to connect remotely to alexa/google

simple ridge
#

@plain pike

#

The only option I seem to have is home assistant Assist and I'm reasonably certain that is because I'm not a nabu casa subscriber. Do you have any other thoughts if I may be in error.

plain pike
#

I'm not a nabu casa subscriber and I have the option to expose to Alexa/google

simple ridge
#

holy crap

#

I'm so confused then.

plain pike
#

it looks like you're exposing an alias

#

which says is supported by google home and assist

#

try looking at another entity

simple ridge
#

When I click expose entities at the bottom right, I get this list in photo above which says "to Assist"

plain pike
#

did you integrate alexa manually ?

simple ridge
#

I did not, I actually use google assistant

#

but I did it through the google assistant integration

plain pike
#

so go to your devices page

simple ridge
#

ok

plain pike
# simple ridge

for your 'back patio light' when you click it you don't see expose to google?

simple ridge
#

Thats when I left click on it to go into it

dark dirge
#

Nope, but you could create button cards with a navigate action and remove them from teh sidebar if you like

plain pike
#

also do you have default_config: in your .yaml?

simple ridge
#

let me check

golden mistBOT
#

@simple ridge I converted your message into a file since it's above 15 lines :+1:

simple ridge
#

I do

plain pike
simple ridge
#

Yeah, that is the one I used

plain pike
#

in your google_assistant: part, do you have an exposed_domains: ?

simple ridge
#

Yeah, I have all of that exposing from the text file

#

I was just hoping there was a way to do it through the gui

plain pike
#

expose_by_default is an option

simple ridge
#

theres really no error checking etc when doing it through the text file. (I guess I just wish there was checkboxes etc. so you could turn on and off easier and not all of the pain)

#

Yeah, I see that. But then you end up with 500 entities exposed and showing in google assistant that are never used. But I do see your point about just exposing all and going on with it

plain pike
simple ridge
#

Thats probably what I need to do. Invert my reasoning

#

Making things to complicated

#

So use expose by default and then under entity config set expose to false on every entity I don't want showing in google assistant?

#

Still seems like such a PITA for some reason.

#

But I do follow you on it.

#

Thank you for giving me some advice/ thoughts on this one

azure wind
#

Morning all not sure if this would be

willow berry
#

Hi Guys, im trying to do my dashboard. Im not able to do a complete full row with some stuff on it at the top of my dashboard. Anyone have a idea ?

tribal galleon
willow berry
#

Look like this

#

i would like to pput at the top of that 1 single row with multiple thing

#

Like date time, Pool sensor door sensor

simple ridge
#

@plain pike Thank you!!

plain pike
#

you all good then

#

nice

simple ridge
#

@plain pike For sure. Thanks again

plain pike
#

no worries

nocturne spire
#

Hi everyone, I'm trying to find a solution to print in a pretty way all of my automations.. ordered by day in a week for example. someone has an idea?

pallid zephyr
#

Two tabs in the same browser on the same dashboard, one works and the other has "Custom element doesn't exist: grid-layout".

polar kelp
#

Custom elements are loaded after everything else. And they get one shot. If something happens in the loading (network issues, processor spike, anything) it gives up. Refresh and it should work again.

#

There's also a timeout. If they don't load within that - too bad. In that case switching view and back again should work.

pallid zephyr
#

Overflow menu refresh I haven't seen work. Shift-refresh where I have to login to HA again sometimes works (Firefox). Is there a way to make this deterministic?

halcyon mantle
polar kelp
polar kelp
polar kelp
halcyon mantle
#

Thankz - Will have a browse through. The end result I'm aiming for is having the more-info of my airconditioner and humidier showing on the popup. The popup is called with a tap-action on a state-label.

polar kelp
#

*finds it and looks at the code (updated two years ago)

#

Maybe not...

halcyon mantle
#

Even if they are below each other it will be acceptable, just trying to consolidte and minimise the icons on the picture elements card.

pallid zephyr
polar kelp
#

You'd want to do it with layout-card.js, though.

#

Also see the row below the code sample, about /hacsfiles/

pallid zephyr
#

File exists here: ./custom_components/ui_lovelace_minimalist/cards/lovelace-layout-card/lovelace-layout-card.js

#

extra_module_url:
- /hacsfiles/lovelace-layout-card/lovelace-layout-card.js
?

#

Both tabs working so far. I can go back to beating my head on the wall over CSS. Thanks.

plain pike
pliant mural
#

The following error keeps appearing when I restart:


Logger: custom_components.ui_lovelace_minimalist.base
Source: custom_components/ui_lovelace_minimalist/base.py:333
Integration: UI Lovelace Minimalist (documentation, issues)
First occurred: 1:17:51 PM (4 occurrences)
Last logged: 1:17:51 PM

HACS Frontend repo "button-card" is already installed, Remove it or disable include custom cards
HACS Frontend repo "light-entity-card" is already installed, Remove it or disable include custom cards
HACS Frontend repo "lovelace-card-mod" is already installed, Remove it or disable include custom cards
HACS Frontend repo "simple-weather-card" is already installed, Remove it or disable include custom cards```

Could someone point me to where I need to remove the duplicates?
hollow vale
#

can i get some help with a custom:button-card? i think i'm missing something

tribal galleon
hollow vale
#

uh, no?

tribal galleon
#

Do you have HACS?

hollow vale
#

yea

tribal galleon
#

Search HACS > Frontend for button-card. Install. And refresh browser(s)

hollow vale
#

wow, i figured i'd be customizing the button card in HA, didn't think I needed a different one

tribal galleon
#

The stock cards use plain names. Anything added will begin with custom:.

hollow vale
#

thanks!

#

out of curiosity, could that if statement at the end be simplified? something like

if (states['switch.shelly_shsw_1_e8db84d7180f'].state === "on")
      return "Open";
    else 
      return "Closed";
#

or do you need to refer to the entity all the time?

tribal galleon
#

Technically, that card can use entity as a variable if the entity was defined in the card, but you are also correct. yaml type: custom:button-card entity: switch.gargage-door label: | [[[ if (entity.state === "on") return "Open"; else return "Closed"; ]]]

hollow vale
#

aah

dark dirge
#

You can just remove the else

hollow vale
#

in my case the state and entity are 2 different sources

#

im just comparing it to what little powershell i know

#

i figured it could be simplified in some way

tribal galleon
#

that's fine. The card can refer to one entity and the label can refer to the other entity.

#

You can condense it down to a single line if you wanted to.```yaml
type: custom:button-card
entity: person.derek
name: '[[[ if (entity.state === "home") return "At the house"; else return "Not at the house" ]]]'

dark dirge
#

And you can still remove the else

hollow vale
#

🤔

#

the card is working, but the icon doesn't seem to be flipping

tribal galleon
#

But removing the else won't return the proper label if he's looking for an Open/Closed label.

dark dirge
#

It will

#

You don't need 'else'. That's all I'm saying

#

Or just enjoy the else. Your call

tribal galleon
#

You have the card looking at one entity but also the state of a different entity, right? Post your YAML so we can see what you have.

hollow vale
#

aah wait i think i see my issue

#

the if statement is for the label not the icon

golden mistBOT
#

@hollow vale I converted your message into a file since it's above 15 lines :+1:

tribal galleon
#

Is the state for the Shelly without _input changing? That's the state that the code is looking at. Label is looking at the Shelly_xxx_input entity.

hollow vale
#

uhhh

tribal galleon
#

If you need the state of the Shelly_xxx_input then you'll probably want to create icon: and color: values. And not use state:.

hollow vale
#

the binary sensor is what reads the state

tribal galleon
#

Although, an easier option might be to set the card to use the Shelly_xxx_input and then use a tap_action to toggle the Shelly_xxx entity.

hollow vale
#

i can add entity to tap_action?

plain pike
#

entity: is already there..

#

just swap entities

hollow vale
#

you lost me

tribal galleon
hollow vale
#

yea thats what i was getting at

#

and the if statement would go under icon?

tribal galleon
#

Then, with the entity set to the binary sensor, just set up the state. ```yaml
entity: binary_sensor.shelly1_98cdac0ce253_input
state:

  • value: 'on'
    icon: mdi:garage-open
    color: red
    label: Open
  • value: 'off'
    icon: mdi:garage-lock
    color: green
    label: Closed```
hollow vale
#

aah ok that did it

#

one more dumb question, whats the variable for dark mode primary color?

#

i can do var(--primary-color) but that gives me the brighter blue, i want the darker steelblue, but the card doesn't seem to know what that is

#

i don't want to hardcode a value because if i change the theme it won't change

lyric prairie
shell torrent
#

Is it possible to get the old more-info layout for switches and input_booleans?
A browser-mod perhaps? I have googled quite a lot, but no luck so far.

I'm fine with the new format for lights, but for my heaters, poolpump and so on, it is kind of not-awesome to get the new mega-large button. And then another click to see when it was on/off.
Especially when on a a computer/large monitor. The old layout suited me better for those switches.

golden mistBOT
#

@fallow wyvern I converted your message into a file since it's above 15 lines :+1:

fallow wyvern
#

Hi,

I would appreciate any help with MQTT COVER.
My garage door sends OPEN, CLOSE, OPENING, CLOSING, STOP states to this topic:
publish stat/sonoff/brama/state

I'd like to have animated garage door switch

#

cover:
- name: "MQTT Cover"
state_topic: "stat/sonoff/brama/state"
qos: 0
retain: true
state_open: "OPEN"
state_opening: "OPENING"
state_closed: "CLOSED"
state_closing: "CLOSING"
optimistic: false
value_template: "{{ value.x }}"

golden mistBOT
#

To format your text as code, enter three backticks on the first line, press Shift+Enter for a new line, paste your code, press Enter again for another new line, and lastly three more backticks.
```yaml
example: here
```
Don't forget you can edit your post rather than repeatedly posting the same thing.

lofty remnant
#

Is it possible to make a tile to open and close a sliding gate?

#

Or add text instead of arrows

pliant mural
lyric prairie
pliant mural
broken dust
#

Hi you all, just a quick question:

#

is it possible to have colored buttons (off and on state) in de standard horizontal stack / button card ?

waxen wraith
#

You can change the color of the icon, yes.

#

*this is for the button card

broken dust
#

Thanks TheLobster; and how? with state_color ?

tribal galleon
# broken dust is it possible to have colored buttons (off and on state) in de standard horizon...

Assuming you mean you want to have custom colors for the on/off state of a button card. You can do it with card_mod. Here's an example that I have to get you started. (I combined some of the lines at the end of the code to make it fit within the 15 line restriction.)```yaml

  • type: button
    entity: light.hallway
    card_mod:
    style: |-
    :host {
    {% if is_state('light.hallway', 'off') %}
    --card-mod-icon: mdi:light-switch-off;
    --card-mod-icon-color: red;
    {% else %}
    --card-mod-icon: mdi:light-switch;
    --card-mod-icon-color: green;
    {% endif %}
    }
    ha-card { border: none; }```
#

Here's another example if you need to compare numbers and set the options:

golden mistBOT
#

@tribal galleon I converted your message into a file since it's above 15 lines :+1:

tribal galleon
broken dust
#

thanks! did not know about the card_mod

#

there is so much information that for beginners it is hard to find what you are looking for

tribal galleon
#

Agreed. Also, the stock cards don't offer a lot of customizability. They're okay, but the community has created a lot of good stuff. Card_mod is going outside the realm of the basics. Something like the custom:button-card can do what you want and a bunch more. #frontend-archived message

broken dust
broken dust
#

@tribal galleon how to do one button without text? just one solid color. I'm trying to build a color picker for my RGB led's which are controlled by IR with the broadlink RM4 thingy

tribal galleon
#
  show_name: false
  show_icon: false```
#

but that may lead to some sizing issues...

#

I use the custom:button-card for similar function.

    show_name: false
    show_icon: false
    styles:
      card:
        - border-radius: 50%
        - height: 75px
        - width: 75px
        - background-color: rgba(255, 0, 0, 0.5)```
broken dust
#

trying............

#

do I have to do something else before the 'styles' is working ?

dark dirge
#

you should always clear your browser cache

tribal galleon
dark dirge
#

and...that

broken dust
#

trying..............

#

.......................I'm confused, I thougt we where still talking about the card-mod ?

#

for me it is best to have the most simple option, which would that be? the button-card or the card-mod ? thanks

pallid zephyr
#

I have 2 sidebar entries "UI Lovelace Minimalist" for two dashboards which got installed. It seems to be impossible to change the name which appears in the sidebar. Opened in Settings/Dashboard, the three dots menu does not have a "raw configuration editor", and Edit Dashboard says edit UI not available when in YAML mode. Nothing that I change in the YAML for those dashboards has any apparent effect on the sidebar.

tribal galleon
lyric prairie
#

Note that Minimalist due to some HA limitations does not support the GUI/raw-editor

broken dust
#

Thanks you all, I have a meeting to attend. back tomorrow. @lyric prairie what is config flow ? That is also new for me.

pallid zephyr
lyric prairie
pallid zephyr
#

So there I've now changed the sidebar title of the adaptive view. Don't see how to change the other one yet.

#

Oh it's just called Side panel title, got it now.

blissful tundra
#

does anyone know what am I doing wrong here?

#

the card on the left is taking the color no problem but the one on the right not so much

tribal galleon
#

My guess is your entities. The first one is using an automation which has a state. The second, you have set to the script which does not have a state.

dark dirge
#

scripts do have a state

#

on == running, off == not running

tacit cave
#

scripts only have an on/off state if they have a delay

#

otherwise, no state

dark dirge
#

I would agree with "they only have an 'on' state if they have a delay", but they all have an "off" state if they're not running

#

I'm not sure what "no state" means for their entities

tribal galleon
#

I looked at DevTools and the only script that I have does show a state of off. Running it happens so quickly that I never even see it change to on. The coloring that luckymethod is using is right, by default; gray = off, blue=on (or should be red in their example).

#

I think the easy fix for the issue above would be incorporating an input_boolean helper (for drumming or not drumming), styling based off that, and coordinating the tap_action to run the appropriate script.

blissful tundra
#

script vs automation actually makes sense that's useful thanks

#

so I guess the mushroom cards don't allow to recolor the icons for scripts, that's too bad

tribal galleon
#

@blissful tundra Yes and no. I'm working on something that you might like using the mushroom-template-card. Gimmie a few minutes. (I'm re-learning how to do it.)

blissful tundra
#

awesome 🙂

#

thank you

pallid zephyr
#

Does anyone have a working example of a custom:grid-layout nested within a custom:grid-layout?

pallid zephyr
#

Never mind, I found the right incantation.

tribal galleon
#

@blissful tundra So this kind of works. It does need an input_boolean helper to help with the state. You'll want your automations to toggle the helper appropriately.
I have most of the card set up properly but I cannot figure out how to choose which automation gets call depending on the state. But, for now, it works with tapping to start, double tapping to stop. https://pastebin.com/pxg1yjqh

prime narwhal
#

Is there a card that can display 2-3 different lights/icons/colours based on a sensor?
I'd like to display my tarriff (peak/offpeak/shoulder) as red-orange-green "traffic lights"

dusty summit
#

I think you need to create a template sensor, where you can define the icon, then display that sensor in the card. if you're not using a custom card.

tribal galleon
#

@prime narwhal Are you trying to have one icon that changes color (red, orange, green) and three icons (red, orange, green) that "illuminate" based on the state?
Both options are possible. But, like @dusty summit mentioned, it will depend on the card you're trying to use. (Stock cards can be used but probably have to use card_mod.)

prime narwhal
#

Ideally in an entities card. Either three, with one "lit", or one that changes colour . Whatever is easier...?

#

to replace the text tarrifs above

#

Those values are actually the tariffs set into a utility_meter helper

tribal galleon
#

Would it be acceptable if, for example, the dollar signs next to "Current Elect..." were to change color? Then, you wouldn't need the Traiff entities shown.

prime narwhal
#

It's kindof nice being able to click on it, and see the tariff switch at particular times, But I guess a color change would be OK.
I already have template sensors for the values...

#

eg

      - name: "Electricity Tariff"
        state: "{{ 'peak' if today_at('15:00') < now() < today_at('21:00') else 'offpeak' }}"
#

Maybe I can just set icon_template?

#

but that would just change the icon (maybe) not the colour

tribal galleon
#

I was thinking of incorporating some card_mod into each entity where it wouldn't be hard to change the icon colors.

hollow vale
#

it me, your boi

#

i broke my button again

plain pike
#

lol

hollow vale
#

i have target: entity_id: defined,

#

is it an indentation thing?

golden mistBOT
#

@hollow vale I converted your message into a file since it's above 15 lines :+1:

tribal galleon
#

@hollow vale yaml tap_action: action: call-service service: switch.toggle service_data: entity_id: switch.shelly1_98cdac0ce253

hollow vale
#

got it, thanks!

#

i promise ill never break it again

#

🤞🏾

tribal galleon
#

If you used my code from before, it did not work. Not sure why. Experimenting because it should have worked.

green pivot
#

I am looking for something to display a string on the dashboard but that string would likely be different on a daily basis. I was thinking of using my node-red instance to send the new string each day. Any suggestions?

dusty summit
#

shove it in an input_text, display that?

green pivot
#

Thanks.. I have tried that. is there a way I can have it as read-only on the dashboard. I want node-red to change it but not people.

tribal galleon
#
type: markdown
content: '{{ now().strftime("%m/%d/%Y, %H:%M") }}'
#

Or if you want to really start messing around with it...

golden mistBOT
#

@tribal galleon I converted your message into a file since it's above 15 lines :+1:

jagged ice
#

I’m getting this error when I open the overview tab, then I make refresh and it resolve until I open the overview tab again. “Error loading the view strategy: TypeError: undefined is not an object (evaluating ‘e.entity_id’)”

#

I’m using version 2023.6.2

vast crane
green pivot
vast crane
# green pivot How would I create a custom sensor?

Sensor node from node-red-contrib-home-assistant-websocket. You need the nodered companion integration installed, and then there are nodes in NR which create HA sensors, and when you send a payload to them they update the state/attributes.

green pivot
vast crane
#

I don't recall sorry.

green pivot
#

all good. I will have a play. thanks for the info

viral tinsel
#

Hi everyone
I've a question regarding UI.
I'm using YAML mode to add cards but I found that I can edit UI while using YAML by entering ?edit=1 at the end of the URL access. It's normal ?

dusty summit
#

yes

#

(try not to edit it twice at the same time. you'll probably lose the non yaml update.)

viral tinsel
#

Ok, tk a lot!

dusty summit
#

(as long as I'm understanding you correctly, that is.)

chilly drift
#

I use my SONOS as alarm clock in the moring. Working great, except my teen agers don´t fancy the radio playing outside their bedrooms when school is out. My alarm clock script group all SONOS players, so I need to tweak that, and I would like some control of what SONOS speakers should be playing somehow in the GUI, I guess. I could make one input_boolean for each speaker and toggle those on/off, and testing for this in the script some how.
Any good ideas how to achieve this?

plain pike
#

tell teenagers get a job

#

problem solved

dire heron
#

Two questions on media cards.

  1. I set my cards to only display if there is music playing, so I don't get cluttered with 13 devices if 12 of them aren't even playing music, but is there a way to set a time-out/delay so if I pause music, it doesn't hide the card for like 5 minutes or something, in case I was just pausing for a moment to take a phone call or something?
  2. Is there a way to "combine" cards to only show one card if they're all playing the same audio? I use either AirPlay or Alexa Multi-Room Audio most of the time and don't need a bunch of cards to all be showing the same thing.
    http://img.wtwap.net/230622135922781.png
thorn granite
thorn granite
thorn granite
#

Presumably you know how to set up groups in Helpers. Then you can use an if in your automation to pick one group or the other.

chilly drift
inland token
#

Trying to control a Denon receiver in my effort to learn HA. Integration docs say:

#

To use these commands, call the denonavr.get_command service and append the specific command to the path /goform/formiPhoneAppDirect.xml?:

#

I understand “append the command to the path “

#

Then what do I do with the resultant path + command?

#

This seems to be one of those things that HA users just know, but it’s not really documented anywhere

#

Tried this in a script, based on googled examples, but it says message malformed extra keys not allowed

#

service: denonavr.get_command
service_data:
entity_id: media_player.denon_avr_x1700h
command: /goform/formiPhoneAppDirect.xml?PWON

plain pike
#

I have a Denon but I use Harmony to control it

#

lol

#

I should turn it on and integrate it tho

inland token
#

If the integration actually works..

plain pike
#

it did for me many moons ago

#

but this is a brand new install I'm on

#

haven't actually plugged it in since I did this install

inland token
#

Any idea how you enter/specify the extra needed data?

plain pike
#

shit that being said I forgot about my projector

#

groans

inland token
#

I learned never to try it in cards first, because every card uses a different language/syntax

#

I’m supposed to supply the entity id and command somehow. Reading a Denon technical manual was easy. Figuring out undocumented HA yaml syntax is the hard part

#

Figured it out. It should be service: instead of service_data: depending on where you are entering the yaml in HA. Anybody know why it is not consistent and how you know which to use where?

dark dirge
#

it is consistent as of several builds ago

#

you can use data: everywhere

#

(assuming that you use built-in cards)

inland token
#

Correct, but service_data vs data in different places

dark dirge
#

not any more

#

it is consistent as of several builds ago

#

you can use data: everywhere

inland token
#

Yes. I can use “service” everywhere, but not “service_data”

dark dirge
#

o...k... it's consistent, just not in the way you wanted?

#

don't use service_data: anywhere

inland token
#

Ok, so it works some places, but “data” now works everywhere?

dark dirge
#

yes

#

or, data: actually

inland token
#

Got it! Thanks!

dark dirge
#

sorry, it's been a while since I used standard cards

#

you should be able to use

service: whatever
data:
  whatever:...
#

everywhere, even in cards now

inland token
#

I was trying to use a script and all the examples I saw used “service_data”

dark dirge
#

scripts have never used service_data:

#

only cards do

#

and now don't need to

inland token
#

Thanks! Much clearer now

#

type: custom:button-card
name: 'off'
tap-action:
action: call-service
service: denonavr.get_command
data:
entity_id: media_player.denon_avr_x1700h
command: /goform/formiPhoneAppDirect.xml?PWSTANDBY

#

This card does nothing when tapped

#

This script works fine

#

service: denonavr.get_command
data:
entity_id: media_player.denon_avr_x1700h
command: /goform/formiPhoneAppDirect.xml?PWSTANDBY

dark dirge
#

That, of course, is a custom card and what we discussed earlier doesn't apply

inland token
#

Gotcha. So, I should read the docs for the custom card for syntax?

dark dirge
#

Yes

#

Custom cards can do whatever they want

inland token
#

type: custom:button-card
name: 'off'
tap-action:
action: call-service
entity: media_player.denon_avr_x1700h
service: denonavr.get_command
service_data:
entity_id: media_player.denon_avr_x1700h
command: /goform/formiPhoneAppDirect.xml?PWSTANDBY

#

No luck. Latest attempt.

azure canopy
#

however, I would only like to show them when the switch is on

#

is there something in browser mod which I can use for that? I tried a if-then in a browser mod sequence, but that only seems to accept service calls

lyric prairie
#

Using the service call in a script and evaluate there if the switch is on. Call that script from the card instead of the actionable popup

inland token
#

Using the DenonAVR integration. You’re supposed to do a service call to get the status of various things. What does that look like in JavaScript or any other card? For example, I’m calling denonavr.get_command with command: /goform/formiPhoneAppDirect.xml?Specificquery.

#

I’m guessing it’s some function in place of something like entity.attributes.volume_level

#

state_attr doesn’t seem to be for service calls

lyric prairie
#

Most actions can be done with the mediaplayer service call

#

No need for explicit API calls

#

So the turn_on command in custom:button-card should be something like:

tap_action:
  action: call-service
  service: media_player.turn_on  
  service_data:
    entity_id: media_player.denon_avr_x1700h
#

To get the status of the device just go to dev-tools/states and search for the entity_id

#

That will give you the current state and all of its attributes

#

All available information is already coupled to the entity

inland token
#

Yes. I’m trying to read status info back. For example, it I want to know if the tuner is in auto/manual mode I call denonavr.get_command with the command data: /goform/formiPhoneAppDirect.xml?TMAN?

lyric prairie
#

With the same integration I have all this info within HA without doing calls myself to the API

#

If the device is on it will display even more info like selected source etc...

inland token
#

If I want to know what the bass level is set to for zone2, end the command with .xml?Z2PSBS ?

#

I know that those properties exist

#

For the other properties, you’re supposed to use the command with these parameters and get a return-value. I’ve never done a service-call with a return value before. How do you do it?

#

Will probably use the return value to toggle button states. For example: am/fm

lyric prairie
#

It's a command to the receiver, I don't think it will return any value.

#

At least it is not documented as such

inland token
#

Thanks!

lyric prairie
inland token
#

The Denon docs from Denon that are linked to in the integration docs. For example: ANAUTO at the end of the command sets tuning to auto. ANMANUAL sets to manual. AN? returns the current setting.

lyric prairie
#

Yes the command does set the tuning. Does not even have a response. And even when there is a response you will probably need a get_response call to receive the response. That is not supported. So only one-way commands according all the documentation and if I understand it correctly😅

inland token
#

The Command "AN?" is supposed to return the current selected tuning mode. What do you mean get_response is not supported?

#

I'm still new to HA. I'm not familiar with the get_response command

lyric prairie
#

HA documentation only talks about sending a command, not receiving a response.

#

Even if the Denon API supports it, that will not mean that HA supports it

inland token
#

So in general, there is no way in HA to read a custom setting/value?

#

Unless it is an already-supported sensor/property in the integration?

lyric prairie
#

Yeah I guess so

inland token
#

So, no such thing as a custom sensor?

lyric prairie
#

Not with the existing integration

azure canopy
charred nebula
#

hey folks, question, is there a way to view the time remaining on an automation in a card

#

its not a timer, its an automation that is called when you press a button with a delay

dark dirge
#

Nope

charred nebula
#

wow

#

that seems a bit of a miss, I was looking for a way to list all running automations and the amount of time left on them, but not really done from the looks of it

#

entity.ac I can see when its running and see when it started, I shold be able to math it ?