Skip to content

Picture-elements card no longer documents the ability to control colours of icon based on state #26071

@KennethLavrsen

Description

@KennethLavrsen

Feedback

The Picture-Elements card has as its main selling element that you can create a very powerful graphical display of your house and include entities for both control or visual status.

When you use a backgroud picture and icons - the standard colours from the theme are not always optimal.
And the power of the picture-elements card is that you can choose alternative icons or alternative graphics for an entity.

For example you can have a sofa with a sensor and you change the colour of the sofa shows as an icon based on the state. You are likely to not want to use the same on and off colours as used in the genetic theme.

The 2023.2.0 introduced much more control of theme colours for each type of entity. I can change the on and off colours of all binary sensors in my theme. But the point with the picture-elements card is that I can show a few single binary sensors entities with state colours that are different from all the other binary-sensors incl those used other places in the same picture-elements card.

The picture-elements card provides that you can set the style for every element.

The documentation used to describe exactly how to define the on and off colours. It was broken in 2022.12. And even more broken in 2023.2. But the ability is still there. Just not documented. And it has become much more difficult because now you have to really know what is going on with CSS and theme styles to control the colours. I would not be able to update the docs. I would make a PR if I understood how it works now.

Removing the documentation is really just to show that none seem to care for the picture-elements card any longer.

The picture-elements card should have this documented. I have managed to get a few items working and it is a bit of a cut and try without documentation. Using the theme style names seems to be much more picky with how you do it.

Before December you only needed to know two style names (paper names) and that would override whatever colour defined in the themes. And that is how it is supposed to be. If I want the bed to be blue when vacant and red when occupied while all other binary_sensors are grey/yellow then I should be able to.

When you see people brag about their cool Home Assistant dash boards, it is always a picture-elements card where you see a house groundplane or a 3D perspective drawing with cool things displayed with state colours. This is a flag ship Lovelace card. I do not understand why it is not getting any love anymore.

URL

https://www.home-assistant.io/dashboards/picture-elements/

Version

2023.2.0

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleThe PR had no activity for quite some time, and is marked as Stale

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions