diff --git a/components/ratgdo/ratgdo.cpp b/components/ratgdo/ratgdo.cpp index 145f368..fb39c42 100644 --- a/components/ratgdo/ratgdo.cpp +++ b/components/ratgdo/ratgdo.cpp @@ -639,7 +639,7 @@ namespace ratgdo { this->pref_.save(&this->rollingCodeCounter); } - void RATGDOComponent::register_child(RATGDOComponent* obj) + void RATGDOComponent::register_child(RATGDOClient* obj) { this->children_.push_back(obj); obj->set_parent(this); diff --git a/components/ratgdo/ratgdo.h b/components/ratgdo/ratgdo.h index 8776dc0..cdc2b80 100644 --- a/components/ratgdo/ratgdo.h +++ b/components/ratgdo/ratgdo.h @@ -27,6 +27,9 @@ extern "C" { namespace esphome { namespace ratgdo { + // Forward declare RATGDOClient + class RATGDOClient; + /// Enum for all states a the door can be in. enum DoorState : uint8_t { DOOR_STATE_UNKNOWN = 0, @@ -161,7 +164,7 @@ namespace ratgdo { void readRollingCode(uint8_t& door, uint8_t& light, uint8_t& lock, uint8_t& motion, uint8_t& obstruction); void sendCommand(Commands command); /** Register a child component. */ - void register_child(RATGDOComponent* obj); + void register_child(RATGDOClient* obj); protected: ESPPreferenceObject pref_;