esphome-ratgdo/components/ratgdo/sensor/ratgdo_sensor.h

27 lines
659 B
C
Raw Normal View History

2023-06-09 22:36:56 +00:00
#pragma once
#include "../ratgdo.h"
#include "../ratgdo_state.h"
#include "esphome/components/sensor/sensor.h"
#include "esphome/core/component.h"
namespace esphome {
namespace ratgdo {
2023-06-09 22:38:30 +00:00
enum RATGDOSensorType {
2023-06-09 22:36:56 +00:00
RATGDO_OPENINGS
};
class RATGDOSensor : public sensor::Sensor, public RATGDOClient, public Component {
public:
void dump_config() override;
void setup() override;
2023-06-09 22:44:16 +00:00
void set_ratgdo_sensor_type(RATGDOSensorType ratgdo_sensor_type_) { this->ratgdo_sensor_type_ = ratgdo_sensor_type_; }
2023-06-09 22:36:56 +00:00
protected:
2023-06-09 22:40:08 +00:00
RATGDOSensorType ratgdo_sensor_type_;
2023-06-09 22:36:56 +00:00
};
} // namespace ratgdo
} // namespace esphome