Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for OPT3001 calibrated I2C lux sensor #999

Closed
kylegordon opened this issue Nov 17, 2020 · 1 comment · May be fixed by esphome/esphome#6625
Closed

Support for OPT3001 calibrated I2C lux sensor #999

kylegordon opened this issue Nov 17, 2020 · 1 comment · May be fixed by esphome/esphome#6625

Comments

@kylegordon
Copy link

Describe the problem you have/What new integration you would like
Support for the I2C capable OPT3001 lux sensor - https://www.ti.com/lit/ds/symlink/opt3001.pdf

Please describe your use case for this integration and alternatives you've tried:
A growing number of breakout boards for the OPT3001 sensor are now available at very low cost. They are becoming a common replacement for the 'traditional' LDR and voltage divider.

Example code is available below

Additional context
I have tried hacking together some of the above code into a custom ESPHome I2C sensor as per the documentation, but I have zero C++ knowledge. I can't even get .begin() to work. I am happy to help and test if anyone else can munge the code together.

@OstertagM
Copy link

OstertagM commented Jul 28, 2021

I have made it with an external component over git hub see:

# Example configuration entry
i2c:
  - id: bus_a
    sda: D2
    scl: D1
    scan: True

external_components:
# equivalent shorthand for GitHub
  - source: github://OstertagM/ESPhome-user-component/esphome@main
    components: [ OPT3001 ]
    refresh: 0s

# Example configuration entry
sensor:
  - platform: OPT3001
    i2c_id: bus_a
    illuminance:
      name: "Living Licht"
    address: 0x45
    update_interval: 5s

It was just an integration of the ClosedCube also. I hope somebody improve the code. But for me it works.

@nagyrobi nagyrobi closed this as completed Jul 7, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Nov 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants