jcwillox / lovelace-paper-buttons-row

Adds highly configurable buttons that use actions and per-state styling.
MIT License
285 stars 10 forks source link

Browser Refresh issue when polulating card using auto-entities #184

Open erkr opened 4 months ago

erkr commented 4 months ago

The problem

Hi,

I tried to populate this neath card using the auto-entities card. I made a very simple setup to demonstrate:

type: custom:auto-entities
card_param: buttons
filter:
  template: |
    {%- set entities = states.input_boolean | 
        map(attribute='entity_id') | list -%}
    {{ entities }} 
  include: []
  exclude: []
card:
  type: custom:paper-buttons-row
  base_config:
    tap_action:
      action: toggle
    hold_action:
      action: more-info
show_empty: true

This only works initially, in de card editor and after saving: image

It fails after the first browser refresh: image

A fix would be great

Best Eric

What version of Paper Buttons Row has the issue?

2.1.3

What version of Home Assistant are you running?

2024.5.5

What version of the Frontend are you running?

20240501.1

Example YAML snippet

Provided

Anything in the logs that might be useful for us?

No response

Additional information

No response