get rid of strings

This commit is contained in:
J. Nick Koston 2023-06-07 09:45:49 -05:00
parent a375f2b766
commit 88d000fb2a
No known key found for this signature in database
2 changed files with 9 additions and 0 deletions

View File

@ -639,5 +639,11 @@ namespace ratgdo {
this->pref_.save(&this->rollingCodeCounter);
}
void RATGDOComponent::register_child(RATGDOComponent* obj)
{
this->children_.push_back(obj);
obj->set_parent(this);
}
} // namespace ratgdo
} // namespace esphome

View File

@ -160,9 +160,12 @@ namespace ratgdo {
void statusUpdateLoop();
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);
protected:
ESPPreferenceObject pref_;
std::vector<RATGDOComponent*> children_;
RATGDOStore store_ {};
InternalGPIOPin* output_gdo_pin_;