openings
This commit is contained in:
parent
d92e09f808
commit
b19824bb6d
|
@ -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)
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue