thanks so much for your sharing, it worked 90% for me, but the tvoc value is inconsistent with my actual device, in my device it is 2514(crazy), the HA shows around 555. Any ideas?
Thanks for much for the reply, the unit problem has been solved according to your solution ;-).
The recent update of HA seems to fail this custom component, I’ve add the manifest.json file in the folder, but it still didn’t work :[ any ideas?
Thank you for your update.
I came here to check the availability regarding the Xiaomi Air monitoring equipment(Not, clear_Grass but similar equipment like below)
Regarding this equipment, It seems that this is very simmilar with clear_grass equipment And i applied for this Py file But it doesn’t works.( I also changed the equipment name from MODEL_AIRQUALITYMONITOR_S1 to MODEL_AIRQUALITYMONITOR_B1)
Can you please check the any way to use this equipment in HA?
I dont have this device to test, but it seems that its 99% similar to this one.
You need to find what parameters your device is offering.
For ClearGrass Air Detector i found by bruteforcing by hands next:
‘battery’, ‘battery_state’, ‘co2’, ‘humidity’, ‘pm25’ , ‘temperature’, ‘tvoc’
Important - they must be in alphabetic order.
If your device cant offer any of that parameters - it will not send any of them.
Try replacing all “co2” words to “co2a” in sensor.py(this may be a real solution). Or if you know how - remove all parameters and start adding one by one.
For those interested Bogdan make it!. He has updated a version in his github which is working with Xiaomi Air Miija unit like posted in Ted post below. You rock Bogdan!!! Thanks for update the code!
Thank you Bogdan for you answer and your work but when I try to integrate this sensor with the files in this branch it doesn’t word.
when I put clear_grass in the plateform in the config.yaml, the verif of the config file doesn’t work, It work when I put xiaomi_miio as name of the plateform in the config file but the sensor is not found after rebooting the server.
Currently there is a pull request for adding this sensor natively to HA without custom_components.
I believe that it will be available in new HA release.
Hi all,
I faced the same problem as Ikari - It work when I put xiaomi_miio as name of the platform in the config file but the sensor is not found after rebooting the server.
You can find log here: https://pastebin.com/K4eY1yYs
Hi Ikari, did you ever get all the values from greengrass into HA? Can’t get the custom component to work and the official integration addad in 0.102 only show pm2.5 and tvoc so i miss co2, temp and humidity.