ESPHome 2026.11.0-dev
Loading...
Searching...
No Matches
husb238.h
Go to the documentation of this file.
1#pragma once
2
6#ifdef USE_BINARY_SENSOR
8#endif
9
10namespace esphome::husb238 {
11
12static constexpr uint8_t REG_PD_STATUS1 = 0x01;
13static constexpr uint8_t PD_STATUS1_ATTACHED = 1 << 6;
14static constexpr uint8_t PD_STATUS1_CC_DIR = 1 << 7;
15
17 public:
18 void setup() override;
19 void update() override;
20 void dump_config() override;
21
22#ifdef USE_BINARY_SENSOR
23 SUB_BINARY_SENSOR(attached)
24 SUB_BINARY_SENSOR(cc_direction)
25#endif
26};
27
28} // namespace esphome::husb238
This class simplifies creating components that periodically check a state.
Definition component.h:514
This Class provides the methods to read/write bytes from/to an i2c device.
Definition i2c.h:132