Add a SendspinPolloingChild class to enforce uniform setup priority

This commit is contained in:
Kevin Ahrendt
2026-04-24 08:43:42 -04:00
parent 52eeb52d0e
commit 8f3a2691fa
@@ -216,6 +216,16 @@ class SendspinChild : public Component, public Parented<SendspinHub> {
float get_setup_priority() const override { return sendspin_priority::CHILD; }
};
/// @brief Base class for sendspin subcomponents that need polling behavior.
///
/// Same purpose as SendspinChild but inherits from PollingComponent for subcomponents
/// that poll on a fixed interval. Subcomponents should inherit from this instead of
/// listing PollingComponent/Parented individually and must not override get_setup_priority().
class SendspinPollingChild : public PollingComponent, public Parented<SendspinHub> {
public:
float get_setup_priority() const override { return sendspin_priority::CHILD; }
};
} // namespace esphome::sendspin_
#endif // USE_ESP32