From ef21292a6e805c469f989428f2bdc1cf1a0abc32 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Wed, 7 Jun 2023 17:49:37 -0500 Subject: [PATCH] cleanup --- components/ratgdo/binary_sensor/ratgdo_binary_sensor.cpp | 4 +--- components/ratgdo/binary_sensor/ratgdo_binary_sensor.h | 3 --- components/ratgdo/cover/ratgdo_cover.cpp | 4 ---- components/ratgdo/cover/ratgdo_cover.h | 6 +----- 4 files changed, 2 insertions(+), 15 deletions(-) diff --git a/components/ratgdo/binary_sensor/ratgdo_binary_sensor.cpp b/components/ratgdo/binary_sensor/ratgdo_binary_sensor.cpp index b3b6272..0a24d40 100644 --- a/components/ratgdo/binary_sensor/ratgdo_binary_sensor.cpp +++ b/components/ratgdo/binary_sensor/ratgdo_binary_sensor.cpp @@ -30,9 +30,7 @@ namespace ratgdo { if (this->binary_sensor_type_ == SensorType::RATGDO_SENSOR_OBSTRUCTION) this->publish_state(state == ObstructionState::OBSTRUCTION_STATE_OBSTRUCTED); } - void RATGDOBinarySensor::on_door_state(DoorState state) { } - void RATGDOBinarySensor::on_light_state(LightState state) { } - void RATGDOBinarySensor::on_lock_state(LockState state) { } + } // namespace ratgdo } // namespace esphome diff --git a/components/ratgdo/binary_sensor/ratgdo_binary_sensor.h b/components/ratgdo/binary_sensor/ratgdo_binary_sensor.h index ae790e0..de782c4 100644 --- a/components/ratgdo/binary_sensor/ratgdo_binary_sensor.h +++ b/components/ratgdo/binary_sensor/ratgdo_binary_sensor.h @@ -22,9 +22,6 @@ namespace ratgdo { void on_motion_state(MotionState state) override; void on_obstruction_state(ObstructionState state) override; - void on_door_state(DoorState state) override; - void on_light_state(LightState state) override; - void on_lock_state(LockState state) override; protected: SensorType binary_sensor_type_; diff --git a/components/ratgdo/cover/ratgdo_cover.cpp b/components/ratgdo/cover/ratgdo_cover.cpp index d5527ea..170729f 100644 --- a/components/ratgdo/cover/ratgdo_cover.cpp +++ b/components/ratgdo/cover/ratgdo_cover.cpp @@ -13,8 +13,6 @@ namespace ratgdo { { LOG_COVER("", "RATGDO Cover", this); } - void RATGDOCover::on_motion_state(MotionState state) { } - void RATGDOCover::on_obstruction_state(ObstructionState state) { } void RATGDOCover::on_door_state(DoorState state) { switch (state) { @@ -42,8 +40,6 @@ namespace ratgdo { this->publish_state(); } - void RATGDOCover::on_light_state(LightState state) { } - void RATGDOCover::on_lock_state(LockState state) { } CoverTraits RATGDOCover::get_traits() { diff --git a/components/ratgdo/cover/ratgdo_cover.h b/components/ratgdo/cover/ratgdo_cover.h index 64aa026..48f8170 100644 --- a/components/ratgdo/cover/ratgdo_cover.h +++ b/components/ratgdo/cover/ratgdo_cover.h @@ -13,12 +13,8 @@ namespace ratgdo { public: void dump_config() override; cover::CoverTraits get_traits() override; - - void on_motion_state(MotionState state) override; - void on_obstruction_state(ObstructionState state) override; void on_door_state(DoorState state) override; - void on_light_state(LightState state) override; - void on_lock_state(LockState state) override; + protected: void control(const cover::CoverCall& call) override;