From 1e916230df4ed7673c9c55fcf42ef062a77e789d Mon Sep 17 00:00:00 2001 From: Chris Nussbaum Date: Mon, 6 Jun 2022 21:41:13 -0500 Subject: [PATCH] Fix parameter types for pool select callbacks (#39) --- components/pool_controller/pool_controller.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/pool_controller/pool_controller.cpp b/components/pool_controller/pool_controller.cpp index 6b0f6c0..d68cb78 100644 --- a/components/pool_controller/pool_controller.cpp +++ b/components/pool_controller/pool_controller.cpp @@ -27,7 +27,7 @@ PoolController::PoolController() { this->pump_select_->set_name("Pool Pump Mode"); this->pump_select_->set_icon("mdi:pump"); this->pump_select_->traits.set_options({"Off", "Normal", "Always Except Peak", "Always"}); - this->pump_select_->add_on_state_callback([this](std::string value, size_t index) -> void { + this->pump_select_->add_on_state_callback([this](const std::string &value, size_t index) { this->pump_mode_ = static_cast(index); }); @@ -38,7 +38,7 @@ PoolController::PoolController() { this->cleaner_select_->set_name("Pool Cleaner Mode"); this->cleaner_select_->set_icon("mdi:robot-vacuum"); this->cleaner_select_->traits.set_options({"Off", "Normal", "When Pump Is On"}); - this->cleaner_select_->add_on_state_callback([this](std::string value, size_t index) -> void { + this->cleaner_select_->add_on_state_callback([this](const std::string &value, size_t index) { this->cleaner_mode_ = static_cast(index); });