diff --git a/components/ratgdo/sensor/__init__.py b/components/ratgdo/sensor/__init__.py index db17758..1a5fefe 100644 --- a/components/ratgdo/sensor/__init__.py +++ b/components/ratgdo/sensor/__init__.py @@ -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, } diff --git a/components/ratgdo/sensor/ratgdo_sensor.h b/components/ratgdo/sensor/ratgdo_sensor.h index aa160db..75a244a 100644 --- a/components/ratgdo/sensor/ratgdo_sensor.h +++ b/components/ratgdo/sensor/ratgdo_sensor.h @@ -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;