Lovelace Raw Configurator removes double quotes on refresh

Hi all,

I just noticed an issue when creating a condition to show a badge.
I use the Raw Configuration Editor to add the following:

  - badges:
      - entity: person.sergio_sa
      - entity: person.joana
      - entity: device_tracker.x1_sdrive16d
      - type: entity-filter
        entities:
          - entity: sensor.lixo
          - entity: sensor.plastico
          - entity: sensor.papel
        state_filter:
          - operator: ==
            value: "today"

It works perfectly, but when I refresh the page, it stops working because the double quotes are removed and the condition no longer works:

  - badges:
      - entity: person.sergio_sa
      - entity: person.joana
      - entity: device_tracker.x1_sdrive16d
      - type: entity-filter
        entities:
          - entity: sensor.lixo
          - entity: sensor.plastico
          - entity: sensor.papel
        state_filter:
          - operator: ==
            value: today

Is this just me or this happens to everyone?

What happens if you use single quotes?

Same result :frowning:

I believe 0.110.x mishandles badges with an entity-filter.

I have four badges whose visibility is controlled by an entity-filter and in 0.110 none are displayed.

If I open the Raw Configuration Editor, close it, exit UI editing mode, all entity-filter controlled badges are displayed (even if some should be hidden). Refreshing the page causes all of them to disappear (even though some should continue to be displayed).

My Lovelace configuration has not changed, I don’t recall reading any breaking changes for entity-filter, so this must be a bug. I’ll be reporting it in the front-end GitHub repository.

NOTE:
I am using 0.110.3 and do not have the problem you described regarding disappearing quotes.
I have several entity-filters for badges and only the one that use '==' loses its quotes upon saving the file. The other ones that use '!=' or 'on' don’t lose their quotes. I don’t know if this old or new behavior but it seems odd to me.

The fix is on the way :slight_smile:
https://github.com/home-assistant/frontend/issues/6047

1 Like

Glad to hear it and thanks for reporting it.

1 Like

I just tested it in 0.110.4 and the problem persists. Badges still fail to be displayed when their conditions are met.

I opened a new Issue.

Im not sure it was included in the .4 release. At least I didn’t find it in the release notes.

You’re correct. Anticipation got the best of me. I looked again and it was merged to dev branch but not 0.110.4 release.

Oh well. I’ll close the new Issue.