From 2ea0a843fb131c39e1c17e0bf8289ee0a82e9ce9 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Fri, 9 Jun 2023 17:38:30 -0500 Subject: [PATCH] openings --- components/ratgdo/sensor/__init__.py | 4 ++-- components/ratgdo/sensor/ratgdo_sensor.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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;