This commit is contained in:
J. Nick Koston 2023-06-09 17:38:30 -05:00
parent 2c529d254c
commit 2ea0a843fb
No known key found for this signature in database
2 changed files with 4 additions and 4 deletions

View File

@ -8,11 +8,11 @@ from .. import RATGDO_CLIENT_SCHMEA, ratgdo_ns, register_ratgdo_child
DEPENDENCIES = ["ratgdo"]
RATGDOSensor = ratgdo_ns.class_("RATGDOSensor", sensor.Sensor, cg.Component)
SensorType = ratgdo_ns.enum("SensorType")
RATGDOSensorType = ratgdo_ns.enum("RATGDOSensorType")
CONF_TYPE = "type"
TYPES = {
"openings": SensorType.RATGDO_OPENINGS,
"openings": RATGDOSensorType.RATGDO_OPENINGS,
}

View File

@ -9,7 +9,7 @@
namespace esphome {
namespace ratgdo {
enum SensorType {
enum RATGDOSensorType {
RATGDO_OPENINGS
};
@ -17,7 +17,7 @@ namespace ratgdo {
public:
void setup() override;
void dump_config() override;
void set_sensor_type(SensorType sensor_type_) { this->sensor_type_ = sensor_type_; }
void set_sensor_type(RATGDOSensorType sensor_type_) { this->sensor_type_ = sensor_type_; }
void on_openings_change(uint32_t openings) override;