denysdovhan/purifier-card

AQI reported as text

marcodalli opened this issue · 7 comments

Hi, I have a Levoit air purifier connected in HA with VeSync integration (https://www.home-assistant.io/integrations/vesync). The card is working fine, but the AQI file is blank; in VeSync the AQI is reported as a text string (bad, fine, excellent), not a number, inside the attribute "air_quality".
This code works fine and I can see the AQI in the stats:

stats:

  • attribute: air_quality
    subtitle: Qualita

Although this does not work:

aqi:

  • attribute: air_quality

Any idea how this can be fixed? Is the AQI field expecting a number instead of a string?

Thanks!

I also have a Levoit (400S), but mine returns a number. Just curious which model you have?

I get the following from the air filter

air_quality: 2

and am able to use:

aqi:
    attribute: air_quality
    unit: ppb

I also have a Levoit (400S), but mine returns a number. Just curious which model you have?

Hi dimatx, I have a 131S.

Are you putting a dash in front of attribute under aqi? I have a Levoit 300S and the card was displaying "AQI" until I removed the dash and then it worked.

This works:

aqi:
  attribute: air_quality
  unit: PM2.5

This does not:

aqi:
  - attribute: air_quality
    unit: PM2.5

Hi sourworm, removing the dash displays the string correctly, but still as text.
I guess model 131S does not return the actual value, just a description…

Marco

Are you putting a dash in front of attribute under aqi? I have a Levoit 300S and the card was displaying "AQI" until I removed the dash and then it worked.

This works:

aqi:
  attribute: air_quality
  unit: PM2.5

This does not:

aqi:
  - attribute: air_quality
    unit: PM2.5

Thank you for this comment. It helped me fix my isue.

There hasn't been any activity on this issue recently. This issue has now been marked as stale and will be closed if no further activity occurs. Please, update to the latest version and check if that solves the issue. Thank you for your contributions!

This issue was closed because it has been stalled for 30 days with no activity. Please open a new issue if the issue is still relevant, linking to this one.