openings
This commit is contained in:
parent
2c529d254c
commit
2ea0a843fb
|
@ -8,11 +8,11 @@ from .. import RATGDO_CLIENT_SCHMEA, ratgdo_ns, register_ratgdo_child
|
||||||
DEPENDENCIES = ["ratgdo"]
|
DEPENDENCIES = ["ratgdo"]
|
||||||
|
|
||||||
RATGDOSensor = ratgdo_ns.class_("RATGDOSensor", sensor.Sensor, cg.Component)
|
RATGDOSensor = ratgdo_ns.class_("RATGDOSensor", sensor.Sensor, cg.Component)
|
||||||
SensorType = ratgdo_ns.enum("SensorType")
|
RATGDOSensorType = ratgdo_ns.enum("RATGDOSensorType")
|
||||||
|
|
||||||
CONF_TYPE = "type"
|
CONF_TYPE = "type"
|
||||||
TYPES = {
|
TYPES = {
|
||||||
"openings": SensorType.RATGDO_OPENINGS,
|
"openings": RATGDOSensorType.RATGDO_OPENINGS,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
namespace esphome {
|
namespace esphome {
|
||||||
namespace ratgdo {
|
namespace ratgdo {
|
||||||
|
|
||||||
enum SensorType {
|
enum RATGDOSensorType {
|
||||||
RATGDO_OPENINGS
|
RATGDO_OPENINGS
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ namespace ratgdo {
|
||||||
public:
|
public:
|
||||||
void setup() override;
|
void setup() override;
|
||||||
void dump_config() 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;
|
void on_openings_change(uint32_t openings) override;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue