ESPHome  2024.10.2
bedjet_sensor.h
Go to the documentation of this file.
1 #pragma once
2 
7 
8 namespace esphome {
9 namespace bedjet {
10 
11 class BedjetSensor : public BedJetClient, public Component {
12  public:
13  void dump_config() override;
14 
15  void on_status(const BedjetStatusPacket *data) override;
16  void on_bedjet_state(bool is_ready) override;
17  std::string describe() override;
18 
19  void set_outlet_temperature_sensor(sensor::Sensor *outlet_temperature_sensor) {
20  this->outlet_temperature_sensor_ = outlet_temperature_sensor;
21  }
22  void set_ambient_temperature_sensor(sensor::Sensor *ambient_temperature_sensor) {
23  this->ambient_temperature_sensor_ = ambient_temperature_sensor;
24  }
25 
26  protected:
29 };
30 
31 } // namespace bedjet
32 } // namespace esphome
void set_outlet_temperature_sensor(sensor::Sensor *outlet_temperature_sensor)
Definition: bedjet_sensor.h:19
sensor::Sensor * outlet_temperature_sensor_
Definition: bedjet_sensor.h:27
void on_bedjet_state(bool is_ready) override
The format of a BedJet V3 status packet.
Definition: bedjet_codec.h:39
bool is_ready() const
Definition: component.cpp:144
void set_ambient_temperature_sensor(sensor::Sensor *ambient_temperature_sensor)
Definition: bedjet_sensor.h:22
sensor::Sensor * ambient_temperature_sensor_
Definition: bedjet_sensor.h:28
void on_status(const BedjetStatusPacket *data) override
Implementation of SPI Controller mode.
Definition: a01nyub.cpp:7
std::string describe() override
Base-class for all sensors.
Definition: sensor.h:57