mirror of
https://github.com/esphome/esphome.git
synced 2025-10-04 02:52:22 +01:00
lint
This commit is contained in:
@@ -14,8 +14,7 @@ template<typename... Ts> class TurnOnAction : public Action<Ts...> {
|
||||
TEMPLATABLE_VALUE(bool, oscillating)
|
||||
TEMPLATABLE_VALUE(FanSpeed, speed)
|
||||
|
||||
protected:
|
||||
void play_(Ts... x) override {
|
||||
void play(Ts... x) override {
|
||||
auto call = this->state_->turn_on();
|
||||
if (this->oscillating_.has_value()) {
|
||||
call.set_oscillating(this->oscillating_.value(x...));
|
||||
@@ -33,8 +32,7 @@ template<typename... Ts> class TurnOffAction : public Action<Ts...> {
|
||||
public:
|
||||
explicit TurnOffAction(FanState *state) : state_(state) {}
|
||||
|
||||
protected:
|
||||
void play_(Ts... x) override { this->state_->turn_off().perform(); }
|
||||
void play(Ts... x) override { this->state_->turn_off().perform(); }
|
||||
|
||||
FanState *state_;
|
||||
};
|
||||
@@ -43,8 +41,7 @@ template<typename... Ts> class ToggleAction : public Action<Ts...> {
|
||||
public:
|
||||
explicit ToggleAction(FanState *state) : state_(state) {}
|
||||
|
||||
protected:
|
||||
void play_(Ts... x) override { this->state_->toggle().perform(); }
|
||||
void play(Ts... x) override { this->state_->toggle().perform(); }
|
||||
|
||||
FanState *state_;
|
||||
};
|
||||
|
Reference in New Issue
Block a user