Home Assistant Community

My Lovelace Plugins


Update 2019-03-14

This post has grown out of hand.
My plugins are now listed on github

My Lovelace Plugins

Original post below

Some of you may have seen the lovelace plugins I have posted on the forums.

I realized there are some that I have not posted before, so I’ll use this topic to present them - and the old ones.

I’ll make one reply per thing, and then link them from this one.
Feel free to ask questions or discuss in this topic as well!


Installation, upgrade and debugging instruction for plugins.


auto-entities - Automatically populate the entities: list of other cards. (Improved version of the well known monster-card)
state switch - Switch cards based on an entity state or on the logged in user
layout card - Gives you more control over how cards are placed in a view
color glance card - A glance card with a colorized background
useful markdown card - A markdown card that lets you show live entity states and attributes
card modder - Lets you style any card using css
popup card - Replace the more-info dialog with any lovelace card
column card - Display other cards in columns even in a panel view
color-picker - Select light color without more-info

Entity rows

slider entity row - Add a slider for dimming lamps
toggle lock entity row - Avoid accidentally toggling entities
time input row - Input a time without having to open the more-info dialog
fold entity row - Group entities, and fold them away
folding group entity row - Display an entire group of entities at once, and fold it away

Picture elements

dim image element - An image whose opacity follows the brightness of a light
long press - Make any element take one action when pressed and another when pressed and held


browser-commander - Controll the browser viewing your frontend from your backend
lovelace-gen - A lovelace configuration generator with templates other conveniences
lovelace-player - Make any browser a media player
lovelace-fullykiosk - Control the screen and get motion alerts from Fully Kiosk Browser
card-tools - A library of useful tools for authors of custom cards/elements/entity rows.
hass-fontawesome - Use icons from fontawesome anywhere in Home Assistant
card-loader - A quickfix for some custom cards not being able to load other custom cards (not necessary for mine though, mine are perfect /s)


All my plugins are automatically added to the custom_updater and can be seen and managed by the tracker-card.
In order for that to work, you need to add a version number to the url when you import the plugins.

  - url: /local/card-tools.js?v=0
    type: js

What comes after the v= doesn’t matter, and will be replaced as soon as you automatically update the card.
Also note that my cards don’t have version numbers as such, but instead rely on the git commit hashes, so they will look a bit different in the tracker-card:

Buy Me A Coffee


Configuring "Rooms" in lovelace
Palm Springs Theme


First out: Lovelace-gen
The lovelace config generator tool.

This started as a way to split the lovelace-ui.yaml file into more manageable pieces (which I later found out could be done by using the normal !include directive). Then it grew into something much more.

To use the tool, you run it in your config directory, and it will take the file lovelace/main.yaml and automatically generate lovelace-ui.yaml from it. In the most basic form it will just be a copy, but if your file contains !inclued filename the contents of the file filename will be inserted at that point.

Example from my config:

# lovelace/main.yaml
  - !include view_Home.yaml
  - !include view_Lights.yaml
title: Hemma
icon: mdi:home
id: home
  - type: weather-forecast
    entity: weather.dark_sky
  - !include card_presence.yaml

and so on…

Lovelace-gen has two other big features, the !file directive, and the ability to parse jinja2 templates.

I use the !resource directive any time I want to include a script or an image.
An example from my config:

- type: picture-entity
  entity: group.presence_thomas
  image: !file /local/images/thomas_bw.jpg
  show_name: false
  show_state: false
    "home": !file /local/images/thomas_clr.jpg

This replace the first !file statement with /local/lovelace/thomas_bw.jpg?1538162272.4425504. thomas_clr.jpg will be given the same treatment.

The stuff after the question mark is the timestamp at which the generator was run. This ensures that your browser will never try to load a cached version of an image or a script included this way that is older than the last time you ran the script. Insanely useful if you like playing around with plugins.

The jinja templates are useful for avoiding code duplication.
My main use is for including javascript plugins.
I make a list of them in my main.yaml file, and include them with a for-statement:

{% set resources = [
] %}

  {% for res in resources %}
  - url: !resource {{res}}
    type: js
  {% endfor %}

Lovelace: A method of splitting the configuration into several files


This plugin is replaced entirely by layout card

On to something a bit more hands-on: column-card

It is a well known trick (mentioned in the docs to create a header on a lovelace view by using panel:true and vertical-stack.

The problem with this approach is that anything below the header is locked in position by the stack. You lose lovelaces ability to adjust for wider screens. The column card fixes this.

Here are two screenshots from my configuration, showing the same view with my phone held in portrait and landscape mode respectively:

Note how the header stretches across the entire screen, but the cards below move to either below or beside each other depending on the available space.




Since version 0.80, this is built into home-assistant by default

See: Glance card documentation

This plugin will not be maintained, and no support will be given

Somewhat related is color-glance-card

It works exactly like a default glance card except the background color is the primary color of your theme.


This works really great with column-card in combination with the lovelace kiosk mode script by @ciotlosm

Here’s my hallway dashboard for example, with the theme switched when the alarm is armed/disarmed:

Note: This function will most likely be included in home-assistant version 0.80




On the topic of slight modifications to default cards, there’s also useful-markdown-card.

Because let’s face it; the default markdown card isn’t terribly useful…

My card allows you to embed states and attributes from entities in the markdown. Besides that, it works exactly the same as the default.

      - type: custom:useful-markdown-card
        content: >
          ## Lovelace

          Starting with Home Assistant 0.72, we're experimenting with a new way of defining your interface. We're calling it the **Lovelace UI**

          Also, the current time is [[ sensor.time.state ]] [[ sensor.time.attributes.icon ]].


And yes, it updates in real time.




Let’s move on to lovelace-player.

This is not a card but a general plugin that lets you use any browser that’s currently viewing your lovelace interface as a media_player. This means that it can, for example, play back TTS messages.

This also requires that you add a custom component to home assistant, made by @pkozul who is my main source of inspiration for this plugin and the next one.




A similar type of plugin is lovelace-fullykiosk

There’s a fun app for android devices called Fully Kiosk Browser. Its main purpose is to display a single web page, without the user being able to move away from the site, or close the app. But it also gives you a degree of control over the device that iDevice users like myself could only dream of.

For example, you can get a live feed from the devices camera into home assistant, or you can get it to report movement in front of the camera like a security sensor.

All of those features are available through a REST interface and can easily be connected to home assistant. A few of them, though can benefit from this plugin.

Specifically, this plugin gives you the ability to turn on and off the screen of the device remotely, as well as check its current state. It also enables a movement sensor with shorter response time than you’d get via the REST interface. It only works while the device is setup to display your lovelace interface, though.

This plugin is inspired by ha-floorplan-kiosk by @pkozul.


Slide cover entity row
Community Hass.io Add-on: Lovelace Migration


Next are some new types of rows for the default entities card

First up is slider-entity-row

This gives you a brightness slider for any dimmable light.


You can configure it a bit, put the slider below the toggle, hide the slider when the light is turned off and so on…

This is inspired by the custom-ui project for the “old” home assistant interface.

The slider-entity-row now also supports media_player (volume control) and cover (position).
The customization options have been changed though. So your old config may not work with the new version.


Shelly 2 as roller shutter with percentage
.86 Lovelace config x number of lights + dimmer
Lovelace light control ideas wanted


Another row for the entities card

Have you ever accidentally turned a switch on or off when scrolling past on your phone?
If so, you might like toggle-lock-entity-row.


It’s simple enough. Now you have to click the toggle twice before anything happens.

As an added bonus, you can select which users have the ability to unlock the toggle.

This one’s also inspired by custom-ui.




Yet another entity row: time-input-row.

This lets you input a time to a input_datetime right in the lovelace interface, without having to open up the more-info dialog.


I made this solely for my own benefit, so it’s not documented at all, and it only support inputing times, not dates.
If you think you’d use it, let me know and I might try to add the feature.




This plugin is replaced entirely by fold-entity-row

The final entity row (for now) is folding-group-entity-row.

This row works with groups.
It will take a group, and add all of the entities in it in a collapsible list to the entities card.


This was somewhat inspired by haiku by lukiffer.




Next up is an element for picture-elements

dim-image-element takes an image and an entity, and sets the opacity of the image to the brightness value of the entity.

I don’t really see a use case myself, but someone asked about it on discord, and I saw a way to make it happen…

The configuration would look something like:

      - type: custom:dim-image-element
        entity: light.my_dimable_light
        image: !resource my_image.jpg
          top: 50%
          left: 50%

Besides the entity, it takes the same configuration options as the image element.

1 Like



This is included in home-assistant since 0.81.0

But smoother, for more items and much prettier.

See documentation for each card.

A significantly more useful picture-elements element is long-press

This allows you to add elements to your picture that does one thing when you click them, and another - totally different - thing when you click and hold for about half a second.

A typical use case would be a light that you toggle on or off by clicking (or tapping on a touch screen), but holding the mouse button (or finger) down for a while will bring up the more-info dialog and allow you to dim the light or change its color.

But the long-press action can also be something entirely different, like calling a service or toggling a different entity.


Lovelace: Button card
Lovelace with state-dependant colors


Finally, theres another card… kind of…

The card-modder allows you to take any card and inject style it.

Think of the amazing stuff people have made with picture-elements over at sharethelove.io. That’s made possible - in part - because elements can be styled with custom css. And now any normal card can as well.

It’s also a great way to produce atrocities such as:

But I’m sure that in the hands of anyone even just a tiny bit more artistic than myself, it can be used to produce wonderful things.

A bonus feature of this card is that you can manually select which size it will report when placing in the layout. That can give some more control over which card ends up where on screen:


Lovelace: mini graph card
Change background color of a card?
How to rotate image in picture glance card
Birthday reminder card for Lovelace

Awesome stuff mate! I am already using a lot of your cards and now found out you even have more new stuff for us :grinning:



Great stuff here!

I use the card modder personally and the card is very powerful! Can be used to completely re-design your UI.



These are some great ideas. I’ll be trying out the long-press plugin soon. Thanks!



Is there any way to change the number of columns used? Mine is showing 2 columns when 3 would be better. Goes down to 1 on my phone which is great.

Would it be as simple as changing the max column width from 500px to 300px or something like that?

Also getting an error…

https://domain.duckdns.org/local/mini-media-player.js?ver=0.8.1:592:22 NotSupportedError: Cannot define multiple custom elements with the same tag name

lovelace yaml looks like this:

  - title: TV & Movies
    icon: mdi:kodi
    panel: true
      - type: vertical-stack
          - type: custom:column-card
              - type: custom:upcoming-media-card

I’m thinking it’s because I’m trying to use the upcoming-media card inside the column card? Any way to fix that?

1 Like


That would do the trick. 500px was chosen to be as close to the look-and-feel of stock lovelace as possible.

It seems to me like you are importing mini-media-player.js twice. Check that.



I am importing it twice - once for sonarr and once for radarr. Works fine until I use the column card.