New Lovelace card – Flex Cells Card

Hi,

I’ve just made my first Lovelace card – Flex Cells Card.
It lets you create table-like layouts with icons, text, or entities, configurable from a visual editor.

In the future, I plan to add cell actions.
Let me know what you think!

GitHub: https://github.com/michalowskil/flex-cells-card

Screenshots:

28 Likes

What I was waiting for for xears!! Absolutely genious :slight_smile: TOP !!! Thanks for this nice lovelace Card

2 Likes

Hi, I have published a new version v0.2.0 which allows you to set actions on cells - click, hold and double click.

I’ll spend the next week looking for bugs and then I’ll probably start working on conditional coloring of icons, text, and cell backgrounds.

4 Likes

v0.3.x — Added color picker (desktop & mobile).

2 Likes
  • v0.4.x —
    • Added entity attributes with per-attribute rescaling (Input/Output min/max).
    • Fixed tap & hold so secondary actions (e.g., setting brightness) work alongside the primary action.
    • Fixed header/last row background overflow when card padding is set to 0.



What do you think about this?

1 Like

Fantastic card! I’ve been looking for something like this for a while :smiley:

1 Like

Additional examples of what can be quickly and easily created using Flex Cells Card. While creating the media player, I thought it would be useful to display images, for example, the cover of an album being played, so that will be added in the future.


can the color of the values also changed dynamically or only with cardmod?

I’m working on it. In about a week, you’ll be able to use dynamic colors for content and background, and you’ll also be able to hide content when a condition is met. Cardmod won’t be needed.

1 Like

Here it is!

  • v0.5.0 —
    • Added dynamic coloring/hiding/masking.
    • Minor visual improvements.

Now, for example, you can add coloring based on battery charge level (an entity attribute):

While developing this functionality, I thought it would be nice to have dynamic icons. They could be similar to coloring, but instead of selecting a color, you’d select an icon. With this functionality, the above example could look like this:

Please test the current version. If no one reports any bugs, I’ll start creating dynamic icons.

Post screenshots of what you’ve created using Flex Cells Card :slight_smile:

It went faster than I thought:

  • v0.6.0 —
    • Added dynamic icons.

What I was thinking yesterday doesn’t make sense. Why duplicate rules when I can add icons to existing ones? Here’s what’s changed:

Now it’s absolutely possible to do what’s in the screenshot below! Cardmod isn’t required!

3 Likes

Nice!
Will give it a try today. Thanks for sharing this!

1 Like

A wonderful new version v0.7.0 has been released! You can now display the following inputs as controls:

I hope the flex-cells-card will now be in your top 10 Lovelace cards. :smiley:

3 Likes

Hi,

When I display the date from an input_datetime helper it doesn’t seem to display according to my user profile language settings - it gets displayed as yyyy-mm-dd, instead of dd-mm-yyyy.

Is it possible to change the format?

The Tile card displays the full month (which would be better)

1 Like

I just want to chime in and say THANK YOU for this excellent card! Very useful and intuitive, and allows me to display things just the way I want. I especially like the padding controls, so i can fine tune the white space displayed.

Another Date/Time related request: Please add a display format option that would let me show a “time” entity as “XXh, YYm”, so that the “7.5” in the image above would display as “7h 31m”.

2 Likes

Thanks for the positive comment!

Regarding input_datetime formatting, that’s a very good idea. I’ve already prepared a preliminary version that will offer the tokens visible in the screenshot. The MMMM token will be displayed in the language selected in the HA settings.

I don’t have the time to do it today, but I’ll try to publish that version tomorrow.

Regarding what I see in your screenshot, “7.5/0.5” that’s not input_datetime, right? You can format any value using a template and display it in flex-cells-card.

1 Like
  • v0.8.0 —
    • Added formatting for input_datetime.

Thanks for the update - that will indeed be very helpful for datetime entities!

Unfortunately, the one I’m using in my table above is of type “time”. It’s a history_stats value that tells me how long the air conditioner has run today, created in YAML using:

Any chance you could enable the same formatting options for “time” entities as you do for “datetime” ones?

I don’t have any plans for this at the moment, but that doesn’t mean this functionality won’t be available in the future.

For now, try this:

# template.yaml or configuration.yaml under "template:"
template:
  - sensor:
      - name: "AC Run Today (HH:MM)"
        unique_id: ac_run_today_hhmm
        icon: mdi:clock-time-four-outline
        state: >
          {% set v = states('sensor.ac_run_today') | float(0) %}
          {% set h = v | int %}
          {% set m = ((v - h) * 60) | round(0) | int %}
          {% if m == 60 %}{% set h = h + 1 %}{% set m = 0 %}{% endif %}
          {{ '%02d:%02d' | format(h, m) }}

This hasn’t been tested, so it might not work. You’ll have to figure something out.

1 Like

Dude - no I won’t. Because your code works perfectly.

With a minor tweak, I now have exactly what I was aiming for:

THANK YOU! Great card, and great support!

1 Like