diff --git a/esphome/components/select/select.h b/esphome/components/select/select.h index 81c8f68362..fbbecaa5c1 100644 --- a/esphome/components/select/select.h +++ b/esphome/components/select/select.h @@ -67,11 +67,6 @@ class Select : public EntityBase { void add_on_state_callback(std::function &&callback); - protected: - friend class SelectCall; - - size_t active_index_{0}; - /** Set the value of the select by index, this is an optional virtual method. * * This method is called by the SelectCall when the index is already known. @@ -82,6 +77,11 @@ class Select : public EntityBase { */ virtual void control(size_t index) { this->control(this->option_at(index)); } + protected: + friend class SelectCall; + + size_t active_index_{0}; + /** Set the value of the select, this is a virtual method that each select integration must implement. * * This method is called by the SelectCall.