diff --git a/components/ratgdo/sensor/__init__.py b/components/ratgdo/sensor/__init__.py index 1a5fefe..981c16f 100644 --- a/components/ratgdo/sensor/__init__.py +++ b/components/ratgdo/sensor/__init__.py @@ -31,5 +31,5 @@ async def to_code(config): var = cg.new_Pvariable(config[CONF_ID]) await sensor.register_sensor(var, config) await cg.register_component(var, config) - cg.add(var.set_sensor_type(config[CONF_TYPE])) + cg.add(var.set_ratgdo_sensor_type(config[CONF_TYPE])) await register_ratgdo_child(var, config) diff --git a/components/ratgdo/sensor/ratgdo_sensor.h b/components/ratgdo/sensor/ratgdo_sensor.h index 3fa0ea9..f8586fe 100644 --- a/components/ratgdo/sensor/ratgdo_sensor.h +++ b/components/ratgdo/sensor/ratgdo_sensor.h @@ -17,12 +17,12 @@ namespace ratgdo { public: void setup() override; void dump_config() override; - void set_sensor_type(RATGDOSensorType sensor_type_) { this->sensor_type_ = sensor_type_; } + void set_ratgo_sensor_type(RATGDOSensorType sensor_type_) { this->ratgdo_sensor_type_ = sensor_type_; } void on_openings_change(uint32_t openings) override; protected: - RATGDOSensorType sensor_type_; + RATGDOSensorType ratgdo_sensor_type_; }; } // namespace ratgdo