ESPHome Issue with BH1750

There is an issue with the most recent implementation of the above sensor. The configuration parameters:

measurement_time: 69

Is no longer accepted by the compiler (it suggests use something else which I can’t remember). I also suspect that this sensor sometimes kills the OTA on my ESP8266. I’ve had lots of issues with intermittent failures of a unit with this sensor and a BME280 which I believe I “fixed” now by randomly removing the parameter:

update_interval: 90s

This is with ESPHome 1.16

I just compiled the example:

sensor:
  - platform: bh1750
    name: "BH1750 Illuminance"
    address: 0x23
    measurement_time: 69
    update_interval: 60s

wit the most recent version:

And it worked without any problems.

You know what would be helpful @doubledutch? The suggestion you can’t remember:

Thanks, @orange-assistant. Apologies I can not recreate the error. I actually suspect that I have some sort or hardware issue as my random connectivity errors have returned even when I disable this sensor.

Just FYI (don’t want to repurpose this post) my issue is that randomly my ESP8266 sensor refuses to accept incoming OTA connections and reports an error “111 your device may not be connected”. This happens randomly, and after x minutes/hours it starts to work again. Wifi Connectivity is excellent so it’s not a network issue.

I’ll keep investigating but thank you for your prompt reply.

I’m having the exact same experience. If I compile for the BME280 only, it works. If I try the BME280 and BH1750 together, I get the following error: Communication with BH1750 failed!

Both i2c devices are found however.

After the error message, no updates are sent from ESPHome to HA. When I delete the BH1750 from the config file and recompile with BME280, I won’t work either. Only way to get it working again is deleting the integration, remove the device, and add it to HA again.

There is something wrong for sure!