Fix lux discovery always being sent (#99)

This commit is contained in:
Darrell 2021-10-21 10:36:06 -04:00 committed by GitHub
parent b611832f3c
commit 7ad17a7322
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -427,7 +427,7 @@ bool sendDiscoveryHumidity()
bool sendDiscoveryLux()
{
if (!BH1750_I2c) return true;
if (BH1750_I2c.isEmpty()) return true;
DynamicJsonDocument doc(1200);
commonDiscovery(&doc);