From 9293be012ac12921fe9e3caba1d47bd85706257f Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Wed, 7 Jun 2023 10:49:45 -0500 Subject: [PATCH] binary sensor --- components/ratgdo/binary_sensor/ratgdo_binary_sensor.cpp | 8 ++++---- components/ratgdo/binary_sensor/ratgdo_binary_sensor.h | 1 - 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/components/ratgdo/binary_sensor/ratgdo_binary_sensor.cpp b/components/ratgdo/binary_sensor/ratgdo_binary_sensor.cpp index fea355f..9444db8 100644 --- a/components/ratgdo/binary_sensor/ratgdo_binary_sensor.cpp +++ b/components/ratgdo/binary_sensor/ratgdo_binary_sensor.cpp @@ -7,21 +7,21 @@ namespace esphome { namespace ratgdo { -using namespace esphome::binary_sensor; +static const char *const TAG = "ratgdo.binary_sensor"; void RATGDOBinarySensor::dump_config() { LOG_BINARY_SENSOR("", "RATGDO BinarySensor", this); } -void RATGDOBinarySensor::setup() {} +void RATGDOBinarySensor::setup() { + this->publish_internal_state(false); +} void RATGDOBinarySensor::on_door_state(esphome::ratgdo::DoorState state) {} void RATGDOBinarySensor::on_light_state(esphome::ratgdo::LightState state) {} void RATGDOBinarySensor::on_lock_state(esphome::ratgdo::LockState state) {} void RATGDOBinarySensor::on_motion_state(esphome::ratgdo::MotionState state) {} void RATGDOBinarySensor::on_obstruction_state(esphome::ratgdo::ObstructionState state) {} -void RATGDOBinarySensor::loop() {} - } // 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 d082c15..8375d18 100644 --- a/components/ratgdo/binary_sensor/ratgdo_binary_sensor.h +++ b/components/ratgdo/binary_sensor/ratgdo_binary_sensor.h @@ -14,7 +14,6 @@ namespace ratgdo { class RATGDOBinarySensor : public binary_sensor::BinarySensor, public RATGDOClient, public Component { public: void setup() override; - void loop() override; void dump_config() override; void on_door_state(esphome::ratgdo::DoorState state) override;