Sonoff AirGuard TH Pressure (SNZB-02M) and AirGuard TH Lite (SNZB-02B)

I have been tinkering with Sonoff sensors recently for monitoring temperature and humidty. I have both the AirGuard TH Pressure (SNZB-02M) and AirGuard TH Lite (SNZB-02B) sensors set up through ZHA. When you read about the specs of these devices on the Sonoff website, they list dew point and vapor pressure deficit (VPD) monitoring as features for these in their eWelink platform. When you add these devices through ZHA you get the generic temperature and humidity entities but neither dew point or VPD. I had originally used the Dew Point integration from HACS to get these readings as they are calculation based readings. However after having issues syncing the readings from my AirGuard TH Pressure (SNZB-02M) with the AirGuard TH (SNZB-02DR2) after it was update to firmware 1.0.5 this week, I stumbled across custom quirks from Sonoff for all three of these devices on the Sonoff support website.

AirGuard TH Pressure (SNZB-02M)

AirGuard TH Lite (SNZB-02B)

The custom quirk for the AirGuard TH Pressure (SNZB-02M) adds both dew point and VPD entities to the device in home assistant but the AirGuard TH Lite (SNZB-02B) quirk does not. I also discovered a bug with the VPD entity for the AirGuard TH Pressure (SNZB-02M), it was providing a very different reading to the dew point entities I created through a HACS integration and in hPa by default not kPa as expected. With the help of Claude, it was identified the quirk was only calculating saturation vapor pressure (SVP) and displaying this as VPD. SVP is required to calculate VPD so the quirk had the first stage of calculation but not the final stage. Claude helped me fix this so that VPD is calculated and displayed correctly. We also changed the entity type from atmospheric pressure to pressure so the default unit of measurement would be kPa per usual conventions and not the forced default of hPa by home assistant. Given that the AirGuard TH Lite (SNZB-02B) quirk did not include the dew point or VPD entities, I had claude adapt this quirk. I have since tidied up the quirks and removed the usual fluff that claude likes to add. Both corrected and adapted custom quirks are working well with both AirGuard TH Pressure (SNZB-02M) and AirGuard TH Lite (SNZB-02B) sensors, providing dew point and VPD entitied for both sensor types.

If anyone is interested in the adapted and corrected sonoff quirks for these devices I have them here:

AirGuard TH Lite (SNZB-02B)

AirGuard TH Pressure (SNZB-02M)

This looks useful - is there a guide for installing the Quirks? I took a look at the GitHub Readme, but couldn’t see anything. Or do I have to wait until the main ZHA repo updates?