AalianKhan / mushroom-strategy

A strategy to automatically generate a dashboard using mushroom cards
MIT License
364 stars 36 forks source link

Wrong "turned on" entities count for domains/views/chips #129

Open maslyankov opened 6 months ago

maslyankov commented 6 months ago

Describe the bug The entities that are on for domain/view and also in chips have some miscalculation because they count the unavailable devices/entities as "ON" and are included in the count of "X climates on" for example and the according chip card.

Versions

To Reproduce Steps to reproduce the behavior:

  1. Have a unavailable entity
  2. Go to 'Home' or device view/domain
  3. Check count
  4. See error where entities "turned on" count contains ("turned on" + "unavailable")

Expected behavior Unavailable entities should not be counted as ON.

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Add any other context about the problem here.

DigiLive commented 5 months ago

Actually it's not an on status for all domains. See the overview below:

Fan: is on Switch: is on Light: is on Climate: not off Cover: is open

Since unavailable is a member of the not off status, it's counted indeed. I also think it's better to remove unavailable entities from the climate count.