home-assistant / frontend

:lollipop: Frontend for Home Assistant
https://demo.home-assistant.io
Other
4.06k stars 2.78k forks source link

Badges - not possible to edit after creation - Auto-entities #21823

Open dajomu1 opened 2 months ago

dajomu1 commented 2 months ago

Checklist

Describe the issue you are experiencing

Added a card using the Auto-entities plugin in the badges section which should be hidden until battery level goes under x-percentage. When going out of edit mode, the card is hidden but when entering edit mode again I am not able to see the card for further editing. It will only appear, even in edit mode, when battery level goes below defined threshold.

Describe the behavior you expected

The card should be visible in edit mode and hidden only when not in edit mode.

Steps to reproduce the issue

  1. Add a badge
  2. go to code editor
  3. replace code (see code under "Problem-relevant frontend configuration")
  4. go out of code editor (now the GUI has changed)
  5. go to Card
  6. Remove tick "show if empty"
  7. save

What version of Home Assistant Core has the issue?

2024.8.3

What was the last working version of Home Assistant Core?

No response

In which browser are you experiencing the issue with?

Firefox 129.02, Brave Version 1.69.153 Chromium: 128.0.6613.85 (Official Build) (64-bit)

Which operating system are you using to run this browser?

Kubuntu 24.04, Win10, IOS

State of relevant entities

No response

Problem-relevant frontend configuration

type: custom:auto-entities
card:
  show_header_toggle: false
  type: entities
filter:
  include:
    - attributes:
        device_class: battery
      state: <= 10
  exclude:
    - name: /[Ll]ow/
    - name: /[Ss]tate/
    - entity_id: '*phone*'
    - entity_id: '*ipad*'
sort:
  method: state
  numeric: true
show_empty: true

Javascript errors shown in your browser console/inspector

No response

Additional information

No response

piitaya commented 2 months ago

Please open an issue on the auto-entities repository. Cards in badges container are not really supported so issues may exist as they are a different thing.

karwosts commented 2 months ago

There is perhaps a similar issue with entity-filter badge. If all entities are filtered, there's nothing visible in edit mode to reopen the editor (have to go to yaml).

piitaya commented 2 months ago

Oh right @karwosts. This one is an old badge so it doesn't support well UI. We should fix that 🙂