10 static const uint8_t ZA_MAX_MS = 2;
11 static const uint8_t ZA_MSG_LEN = 5;
12 static const uint8_t ZA_FRAME_SIZE = 40;
13 static const uint8_t ZA_MSG_DELIMETER = 0x0D;
15 static const uint8_t ZA_BYTE_TYPE = 0;
16 static const uint8_t ZA_BYTE_HIGH = 1;
17 static const uint8_t ZA_BYTE_LOW = 2;
18 static const uint8_t ZA_BYTE_SUM = 3;
19 static const uint8_t ZA_BYTE_END = 4;
34 bool decode(uint32_t ms,
bool data);
38 uint8_t buffer_[ZA_MSG_LEN];
47 uint16_t humidity = -1;
69 void setup()
override { this->store_.setup(this->pin_clock_, this->pin_data_); }
70 void dump_config()
override;
71 void update()
override;
Component for reading temperature/co2/humidity measurements from ZyAura sensors.
InternalGPIOPin * pin_clock_
const float DATA
For components that import data from directly connected sensors like DHT.
Copy of GPIOPin that is safe to use from ISRs (with no virtual functions)
void set_co2_sensor(sensor::Sensor *co2_sensor)
This class simplifies creating components that periodically check a state.
void set_temperature_sensor(sensor::Sensor *temperature_sensor)
InternalGPIOPin * pin_data_
ISRInternalGPIOPin pin_data_
ZaDataProcessor processor_
void set_humidity_sensor(sensor::Sensor *humidity_sensor)
float get_setup_priority() const override
Implementation of SPI Controller mode.
void set_pin_clock(InternalGPIOPin *pin)
void set_pin_data(InternalGPIOPin *pin)
ISRInternalGPIOPin pin_clock_
Base-class for all sensors.
esphome::sensor::Sensor * sensor