6#ifdef USE_BINARY_SENSOR
23#ifdef HYDREON_RGXX_NUM_SENSORS
24static const uint8_t NUM_SENSORS = HYDREON_RGXX_NUM_SENSORS;
26static const uint8_t NUM_SENSORS = 1;
29#ifndef HYDREON_RGXX_PROTOCOL_LIST
30#define HYDREON_RGXX_PROTOCOL_LIST(F, SEP) F("")
33#define HYDREON_RGXX_IGNORE_LIST(F, SEP) F("Emitters") SEP F("Event") SEP F("Reset")
38#ifdef USE_BINARY_SENSOR
52 void setup()
override;
65#ifdef USE_BINARY_SENSOR
This class simplifies creating components that periodically check a state.
Base class for all binary_sensor-type classes.
HydreonRGxxBinaryComponent(HydreonRGxxComponent *parent)
void update() override
Schedule data readings.
void setup() override
Setup the sensor and test for a connection.
binary_sensor::BinarySensor * em_sat_sensor_
void set_resolution(RG15Resolution resolution)
bool buffer_starts_with_(const char *prefix)
binary_sensor::BinarySensor * lens_bad_sensor_
void set_lens_bad_sensor(binary_sensor::BinarySensor *sensor)
void set_disable_led(bool disable_led)
void set_sensor(sensor::Sensor *sensor, int index)
int16_t no_response_count_
int num_sensors_missing_()
void set_request_temperature(bool b)
bool request_temperature_
void schedule_reboot_()
Communication with the sensor is asynchronous.
RG15Resolution resolution_
binary_sensor::BinarySensor * too_cold_sensor_
void loop() override
Read data once available.
sensor::Sensor * sensors_[NUM_SENSORS]
void set_too_cold_sensor(binary_sensor::BinarySensor *sensor)
bool buffer_starts_with_(const std::string &prefix)
void set_em_sat_sensor(binary_sensor::BinarySensor *sensor)
void dump_config() override
void set_model(RGModel model)
Base-class for all sensors.