This commit is contained in:
J. Nick Koston 2023-06-09 17:40:08 -05:00
parent d92e09f808
commit b19824bb6d
No known key found for this signature in database
2 changed files with 3 additions and 3 deletions

View File

@ -31,5 +31,5 @@ async def to_code(config):
var = cg.new_Pvariable(config[CONF_ID]) var = cg.new_Pvariable(config[CONF_ID])
await sensor.register_sensor(var, config) await sensor.register_sensor(var, config)
await cg.register_component(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) await register_ratgdo_child(var, config)

View File

@ -17,12 +17,12 @@ namespace ratgdo {
public: public:
void setup() override; void setup() override;
void dump_config() 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; void on_openings_change(uint32_t openings) override;
protected: protected:
RATGDOSensorType sensor_type_; RATGDOSensorType ratgdo_sensor_type_;
}; };
} // namespace ratgdo } // namespace ratgdo