๐ŸŒซ๏ธ Air purifier dashboard lovelace card with pm2.5 and other features

I connected my Xiaomi Purifier 4 Compact to Home Assistant via LAN.
Functionally everything worked, but the organization of stock dashboard cards didnโ€™t suit me. In the end, I made a custom card โ€” predictable, compact, and informative.

  • the icon color changes depending on the pollution level :green_circle: :orange_circle: :red_circle:
  • shows the current PM2.5 level
  • when the filter is running out, the remaining filter life in days is displayed
    • less than 60 days โ€” orange :orange_square:
    • less than 30 days โ€” red :red_square:
  • tapping the card lets you control the purifier fan speed
  • tapping the icon shows the air quality graph โ€” convenient for correlating air quality changes with your actions

Yes, this is not rocket science.
But if it saves someone a couple of hours of life โ€” then it was worth it.

1 Like

Awesome, I needed this. Thank you!f

1 Like

Youโ€™re very welcome. I am glad that it is useful for somebody else :handshake:

Hi, maybe will be useful for you

I forget to change color of card to gray if device is off. I updated the code, you can use it.