ESPHome 2025.5.0
Loading...
Searching...
No Matches
bh1750.h
Go to the documentation of this file.
1#pragma once
2
6
7namespace esphome {
8namespace bh1750 {
9
15
18 public:
19 // ========== INTERNAL METHODS ==========
20 // (In most use cases you won't need these)
21 void setup() override;
22 void dump_config() override;
23 void update() override;
24 float get_setup_priority() const override;
25
26 protected:
27 void read_lx_(BH1750Mode mode, uint8_t mtreg, const std::function<void(float)> &f);
28
29 uint8_t active_mtreg_{0};
30};
31
32} // namespace bh1750
33} // namespace esphome
BedjetMode mode
BedJet operating mode.
This class simplifies creating components that periodically check a state.
Definition component.h:301
This class implements support for the i2c-based BH1750 ambient light sensor.
Definition bh1750.h:17
void read_lx_(BH1750Mode mode, uint8_t mtreg, const std::function< void(float)> &f)
Definition bh1750.cpp:49
void dump_config() override
Definition bh1750.cpp:117
float get_setup_priority() const override
Definition bh1750.cpp:166
This Class provides the methods to read/write bytes from/to an i2c device.
Definition i2c.h:133
Base-class for all sensors.
Definition sensor.h:57
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7