15#ifdef USE_BINARY_SENSOR
40#ifdef USE_BINARY_SENSOR
50 void setup()
override;
55 void configure(
const char *host, uint16_t port,
const char *prefix) {
58 this->prefix_ = prefix;
65#ifdef USE_BINARY_SENSOR
74 std::vector<sensors_t> sensors_;
79 std::unique_ptr<esphome::socket::Socket> sock_;
83 void send_(std::string *out);
This class simplifies creating components that periodically check a state.
Base class for all binary_sensor-type classes.
Base-class for all sensors.
void configure(const char *host, uint16_t port, const char *prefix)
void register_sensor(const char *name, esphome::sensor::Sensor *sensor)
void register_binary_sensor(const char *name, esphome::binary_sensor::BinarySensor *binary_sensor)
float get_setup_priority() const override
void dump_config() override
enum { TYPE_SENSOR, TYPE_BINARY_SENSOR } sensor_type_t
struct { const char *name; sensor_type_t type; union { #ifdef USE_SENSOR esphome::sensor::Sensor *sensor;#endif #ifdef USE_BINARY_SENSOR esphome::binary_sensor::BinarySensor *binary_sensor;#endif };} sensors_t
Providing packet encoding functions for exchanging data with a remote host.