denysdovhan / purifier-card

Air Purifier card for Home Assistant Lovelace UI
MIT License
279 stars 91 forks source link

Set AQI by custom AQI Entity - Coway Airmega #36

Closed tbase9 closed 3 years ago

tbase9 commented 3 years ago

I'm trying to add a custom AQI entity/attribute to set the AQI value for an Airmega 400S. Though when I add the AQI code into the card, all that changes is the "units". The only entities in Hass that came from the IOCare integration were a fan, a switch, and an air_quality entity. The fan appears to be able to turn on and off the device, and also displays the filter levels and fan speed. The switch I have no idea what it does, and the air quality shows values in ug/m3 units.

I have posted the code below. I opened the issue in this repo since I didn't know where else to ask a question about this and I thought this may have been an issue with the card itself. Please let me know if any more information would be helpful or if there is another place to post this question.

aqi:
   entity: air_quality.airmega400s
   attribute: air_quality_index
   unit: "ug/m3"
mihsu81-hacs commented 3 years ago

Hi @tbase9,

You should use _entityid instead of entity.

This is how i have it set up and working fine. I'm displaying the PM2.5 density because my Purifier doesn't have a AQI sensor in the current integration.

aqi: entity_id: sensor.mb4_5ce50ca7e711_density attribute: Environmen pm2 5 density unit: µg/m³

image

denysdovhan commented 3 years ago

Already answered by @mihsu81-hacs. Thanks @mihsu81-hacs!