14#ifdef USE_BINARY_SENSOR
29static constexpr uint8_t OPER_OFF = 0x00;
30static constexpr uint8_t OPER_IN = 0x01;
31static constexpr uint8_t OPER_OUT = 0x02;
32static constexpr uint8_t OPER_IN_OUT = 0x03;
33static constexpr uint8_t OPER_SENSOR_OR_AUTO = 0x04;
37static constexpr uint8_t SPEED_OFF = 0x00;
38static constexpr uint8_t SPEED_SLEEP = 0x01;
39static constexpr uint8_t SPEED_VEL1 = 0x02;
40static constexpr uint8_t SPEED_VEL2 = 0x03;
41static constexpr uint8_t SPEED_VEL3 = 0x04;
42static constexpr uint8_t SPEED_MASK = 0x0F;
43static constexpr uint8_t FLAG_AUTO = 0x10;
44static constexpr uint8_t FLAG_BOOST = 0x40;
49 void setup()
override;
55 esp_ble_gattc_cb_param_t *param)
override;
56 void gap_event_handler(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_param_t *param)
override;
58#ifdef ECOCOMFORT2_CHILD_COUNT
67#ifdef USE_BINARY_SENSOR
99 bool read_ok_(
const esp_ble_gattc_cb_param_t *param);
107#ifdef ECOCOMFORT2_CHILD_COUNT
116#ifdef USE_BINARY_SENSOR
120#ifdef USE_TEXT_SENSOR
BedjetMode mode
BedJet operating mode.
This class simplifies creating components that periodically check a state.
Minimal static vector - saves memory by avoiding std::vector overhead.
Base class for all binary_sensor-type classes.
espbt::ClientState node_state
Hub component for Ecocomfort 2.0 VMC via BLE.
uint16_t char_handle_state_
float get_setup_priority() const override
binary_sensor::BinarySensor * boost_binary_sensor_
static constexpr uint32_t READBACK_DELAY_MS
sensor::Sensor * voc_sensor_
uint8_t get_mode() const
Raw C_OPER values from the last readback.
void set_humidity_sensor(sensor::Sensor *s)
void read_char_(uint16_t handle)
static constexpr uint32_t AUTH_TIMEOUT_ID
bool is_ready() const
True once the link is established and paired.
void on_state_(const uint8_t *data, uint16_t len)
text_sensor::TextSensor * firmware_text_sensor_
void set_direction_sensor(sensor::Sensor *s)
void on_info_(const uint8_t *data, uint16_t len)
uint16_t char_handle_oper_
void set_firmware_text_sensor(text_sensor::TextSensor *s)
sensor::Sensor * temperature_sensor_
StaticVector< Ecocomfort2Client *, ECOCOMFORT2_CHILD_COUNT > children_
binary_sensor::BinarySensor * connected_binary_sensor_
time::RealTimeClock * time_
static constexpr uint32_t READBACK_TIMEOUT_ID
sensor::Sensor * direction_sensor_
void set_connected_binary_sensor(binary_sensor::BinarySensor *s)
void gap_event_handler(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_param_t *param) override
void set_voc_sensor(sensor::Sensor *s)
uint8_t get_speed() const
uint16_t char_handle_info_
void register_child(Ecocomfort2Client *obj)
bool read_ok_(const esp_ble_gattc_cb_param_t *param)
void set_boost_binary_sensor(binary_sensor::BinarySensor *s)
void set_time(time::RealTimeClock *time)
Keeps the unit's clock in step with this time source while connected.
uint16_t char_handle_clock_
void write_oper(uint8_t mode, uint8_t speed)
Write C_OPER (mode byte, speed/flags byte) and read it back shortly after.
sensor::Sensor * humidity_sensor_
void set_temperature_sensor(sensor::Sensor *s)
void dump_config() override
void gattc_event_handler(esp_gattc_cb_event_t event, esp_gatt_if_t gattc_if, esp_ble_gattc_cb_param_t *param) override
void set_connected_(bool connected)
void on_oper_(const uint8_t *data, uint16_t len)
static constexpr uint32_t AUTH_TIMEOUT_MS
Base-class for all sensors.
The RealTimeClock class exposes common timekeeping functions via the device's local real-time clock.
constexpr float BLUETOOTH
spi_device_handle_t handle