MH-Z19 CO_2 and Temperature Sensor

See Application::make_mhz19_sensor().

API Reference

class MHZ19Component : public PollingComponent, public UARTDevice

Public Functions

MHZ19Component(UARTComponent *parent, const std::string &name, uint32_t update_interval = 15000)
float get_setup_priority() const

priority of setup().

higher -> executed earlier

Defaults to 0.

Return
The setup priority of this component

void update()
MHZ19TemperatureSensor *make_temperature_sensor(const std::string &name)
MHZ19CO2Sensor *get_co2_sensor() const

Protected Functions

bool mhz19_write_command_(const uint8_t *command, uint8_t *response)

Protected Attributes

MHZ19TemperatureSensor *temperature_sensor_ = {nullptr}
MHZ19CO2Sensor *co2_sensor_
using sensor::MHZ19CO2Sensor = typedef sensor::EmptyPollingParentSensor<0, ICON_PERIODIC_TABLE_CO2, UNIT_PPM>
using sensor::MHZ19TemperatureSensor = typedef sensor::EmptyPollingParentSensor<0, ICON_EMPTY, UNIT_C>