My Lovelace Plugins

@thmry - Thomasloven recently helped me with this same challenge. The issue here is you cannot use the group domain with this card. In order to get this working you need to create a light group (someone else linked to the docs above my post). Here is what I added to my configuration.yaml in order to get slider-entity-row working.

light:
  - platform: group
    name: Great Room
    entities:
    - light.indoorkitchen_level
    - light.dining_room_level 

What wasn’t immediately clear from the documentation page is the resulting entity name. In my case, the entity name is light.great_room. From there, you use the entity name for the new light group as the entity for slider-entity-row. This will allow you to change the slider value for all of your grouped lights at once.

I updated the post to show it. Sorry should have done that to start with. And I used the useful-markdown-card as it allows you to insert values.

Mad props to @thomasloven for the many awesome cards!

2 Likes

Be the change you want to see in the world.

2 Likes

@VDRainer @daphatty Thanks for helping!

I’ve never realized that light entities in a group domain aren’t actually part of a light group. I’ve been using Home Assistant for almost a year now and used groups (group domain) to turn on and off multiple lights (in that specific group) which works fine.

I’m now actually using a light group and that makes it work with fold-entity-row, so thanks again!

1 Like

Thanks a lot ! That did it.

Btw: this card used with your lovelace-gen.py tool is giving me so much opportunities to customize HA how I want ! You’re doing an awesome job !!!

edit: I might have spoken a bit to fast, the 2 plugins I mentionned work very well, but some issues occur when trying both at the same time (so it seems).

For example, using :

  • type: custom:state-switch
    entity: binary_sensor.anyone_home
    default: “off”
    states:
    “on”:
    - !include card_alarm.yaml
    “off”:
    - !include card_alarm.yaml

with the tool give me :

  • default: ‘off’
    entity: binary_sensor.anyone_home
    states:
    ‘off’:
    • {entity: alarm_control_panel.alarme, type: alarm-panel}
      ‘on’:
    • {entity: alarm_control_panel.alarme, type: alarm-panel}
      type: custom:state-switch

In lovelace-ui, after generation with your tool. The issue, it seems, is coming from the format -{entity:…, type:…}. Anyway, that’s not a deal breaker for me but I figured you might be interested in knowing this.

Another edit: How to fix → Use a vertical stack like so:

  • type: custom:state-switch
    entity: binary_sensor.anyone_home
    default: “off”
    states:
    “on”:
    type: vertical-stack
    cards:
    - !include card_alarm.yaml

Then it works like a charm, with the auto-gen tool as well.

I’m using the card modder. Is it possible to remove the state ? Because I can see the state from te colour of the icon, so I do not need to see “on” or “of” …

Try removing the dash before the !includes and it should work, I think.

Depends.
What are you using the card-modder on?
Glance card? Sure. Read the docs.
Entities card? No.

1 Like

any idea why I am getting the following error: http://x.x.x.x:8123/local/custom_ui/card-modder.js:58:5 TypeError: this.card is undefined

resources:
- url: /local/custom_ui/card-modder.js
type: module

`config:`
    `- title: Test`
        `cards:`
        `- type: custom:card-modder`
          `card:`
          `- type: glance`
            `entities:`
            `- light.living_left`
            `- light.living_right`
            `- light.living_room_led_trusses`

Thanks Hermen

Challenge accepted… although my recommended change has some errors in it. :frowning: I should have known encasing words with special characters would have unintended results.

Remove the dash before type: glance. The card modder takes one card, not a list of cards.

2 questions;

  1. Is here any way to use a custom icon for items appearing on the pop-up card? I’ve tried defining the icon both in an input_boolean definition in configuration.yaml as well as in customize.yaml neither works (it displays no icon), versus leaving default where it displays the boolean icon.
  2. Is it possible to define the popup card as a popup for multiple entities i.e. the same card appearing for them. I have achieved this using a long hand method of defining the card twice (one for each entity), just wondered if you would consider it as part of the standard definition.

Sorry one other thing. I am also getting an error message (doesn’t stop the card being displayed, but…

2018-11-27 11:31:25 ERROR (MainThread) [frontend.js.latest.201811033] https://xxxxxxxxxx.duckdns.org:8123/local/custom_ui/popup-card.js?v=0.1:46:18 Uncaught TypeError: Cannot read property ‘parentNode’ of undefined

from a definition of

  - id: 8f3fccda0b58466eb117b132cc5841fd  # Automatically created id
    type: custom:popup-card
    entity: light.back_porch
    title: Key Lights
    card:
      type: entities
      entities:
      - input_boolean.front_porch_key
      - input_boolean.back_porch_key
      - input_boolean.cinema_porch_key
  1. The card in the popup card works the same way as a normal card, so you change the icons the same way.

  2. Yes. Just replace the entity: entry with a list of entities (it should still say entity: sing., though).

@thomasloven - brilliant, thanks, I was over thinking in terms of the multiple entities and icons, as you say if defined as part of the card both issues are resolved;

@thomasloven Can your cards be included in the tracker card?
This is a long thread so apologies if I missed it, there seems to be no mention of it on GitHub.

They are.
.

Thanks, what is the entry needed for custom_updater: in the config?

(Currently I am only using the pop-up card)

image

thank you!

This is amazing, exactly what I expected to change UI depending on the user !

But I face one problem, doesn’t seem to work with other custom cards.
This for instance fails :

- type: custom:state-switch
  entity: user
  default: default
  states:
    Admin:
      type: custom:monster-card
      card:
        type: glance
        title: Switches
        show_header_toggle: false
        show_state: false
      filter:
        include:
        - domain: switch
    default:
       type: markdown
       content: "Admin only display"

image

With a “markdown” card, or any stack, it works. The monster-card works too outside of the state-switch.
Is there a reason for that ?

EDIT : it only fails with the GLANCE card type, not with the entity type in the monster-card ?!