6#ifdef USE_BINARY_SENSOR
12namespace hydreon_rgxx {
24#ifdef HYDREON_RGXX_NUM_SENSORS
25static const uint8_t NUM_SENSORS = HYDREON_RGXX_NUM_SENSORS;
27static const uint8_t NUM_SENSORS = 1;
30#ifndef HYDREON_RGXX_PROTOCOL_LIST
31#define HYDREON_RGXX_PROTOCOL_LIST(F, SEP) F("")
34#define HYDREON_RGXX_IGNORE_LIST(F, SEP) F("Emitters") SEP F("Event") SEP F("Reset")
39#ifdef USE_BINARY_SENSOR
53 void setup()
override;
68#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.
float get_setup_priority() const override
void setup() override
Setup the sensor and test for a connection.
binary_sensor::BinarySensor * em_sat_sensor_
void set_resolution(RG15Resolution resolution)
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.
Providing packet encoding functions for exchanging data with a remote host.