Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions components/axp192/axp192.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ void AXP192Component::setup()
begin(false, false, false, false, false);
if (this->brightness_)
{
this->brightness_->add_on_state_callback(std::bind(&AXP192Component::brightness_callback, this, std::placeholders::_1));
this->brightness_->add_on_state_callback([this](float value) { this->brightness_callback(value); });
this->brightness_->publish_state(100);
}
if (this->poweroff_)
{
this->poweroff_->add_on_press_callback(std::bind(&AXP192Component::poweroff_callback, this));
this->poweroff_->add_on_press_callback([this]() { this->poweroff_callback(); });
}
}

Expand Down
4 changes: 2 additions & 2 deletions components/divoom/divoom_display.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ void DivoomDisplay::setup()
if (this->bt_connected_) this->bt_connected_->publish_state(false);
if (this->select_time_)
{
this->select_time_->add_on_state_callback(std::bind(&DivoomDisplay::select_time_callback, this, std::placeholders::_1, std::placeholders::_2));
this->select_time_->add_on_state_callback([this](std::string value, size_t index) { this->select_time_callback(value, index); });
this->select_time_->publish_state(this->select_time_->at(0).value());
}
if (this->brightness_)
{
this->brightness_->add_on_state_callback(std::bind(&DivoomDisplay::brightness_callback, this, std::placeholders::_1));
this->brightness_->add_on_state_callback([this](float value) { this->brightness_callback(value); });
this->brightness_->publish_state(100);
}
timer_ = get_time();
Expand Down
2 changes: 1 addition & 1 deletion components/ip5306/ip5306.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ void IP5306::setup() {
}
if (this->poweroff_)
{
this->poweroff_->add_on_press_callback(std::bind(&IP5306::poweroff_callback, this));
this->poweroff_->add_on_press_callback([this]() { this->poweroff_callback(); });
}
}

Expand Down