"Basic" z-wave entries messed up my light count - need advise

Good morning,
This morning I was trying to figure out why my light count was off (too many) on my Mushroom dashboard.

Screenshot 2024-01-18 at 10.02.13 AM

It’s been like this for a little while, and I determined that the issue was that Z-Wave JS made some changes back in November that added a Basic Command Class value to some of my Z-wave devices. One of the suggestions they made was to re-interview the device if we didn’t think the Basic CC entity shouldn’t be there. Well, I attempted this on a few devices, and it didn’t get rid of the Basic entity, but also seemed to remove my ability to change a switch to a light entity, and it made my old light entities unavailable. Reinterviewing also renamed several devices, so I spent the better part of an hour and a half this morning fixing automation and mushroom cards. I had previously been using Mushroom Light cards, and now for those that are messed up, I have to use Mushroom Entity cards.

Very frustrating.

In any case, aside from fixing the automation and the cards, I’m stuck trying to fix the count. I have a chip card that displays the number of lights on in my home, by counting the number in the domain ‘light’ that are on.

type: custom:mushroom-chips-card
chips:
  - type: back
  - type: template
    icon: mdi:lightbulb
    content: >-
      {% set domain = 'light' %} {% set count = states[domain] | selectattr(
      'state', 'eq', 'on') | list | count %} {{count}} lights on
    icon_color: >-
      {% set domain = 'light' %} {% set count = states[domain] | selectattr(
      'state', 'eq', 'on') | list | count %} {% if count > 0 %} orange {%endif%}
alignment: center

Now, I have several entries that I can no longer count as lights, they are switches. I don’t want to count all the switches either, because this wouldn’t be accurate, because there are simply too many switches that aren’t related to lights.

Any advise to fix my count issue? I wish I could simply change the switch entries to lights like I originally did, but my ability to do that has been somehow removed.

Take the easy route:

That’s a good approach to get rid of the remaining basic. I’m still stuck with the one’s that I reinterviewed, and I can’t change from switch to light. Because of that, I still can’t get an accurate count (I’m down 5 entries). Any thoughts?

Edit. Nevermind. I am able to change it to light. I don’t know why it wasn’t working earilier.