Files
esphome/esphome/components/max17043/automation.h
Jesse Hills 223596a25f Mark user-configurable classes as final (part 10/21)
Add the C++ `final` specifier to leaf, user-configurable component classes and
automation action/trigger/condition primitives so that classes meant to be
terminal cannot be subclassed by external components. Only classes never used as
a base anywhere in the tree are marked. Part 10 of 21, split alphabetically by
component (matrix_keypad .. micronova).
2026-06-15 13:20:32 +12:00

19 lines
421 B
C++

#pragma once
#include "esphome/core/automation.h"
#include "max17043.h"
namespace esphome::max17043 {
template<typename... Ts> class SleepAction final : public Action<Ts...> {
public:
explicit SleepAction(MAX17043Component *max17043) : max17043_(max17043) {}
void play(const Ts &...x) override { this->max17043_->sleep_mode(); }
protected:
MAX17043Component *max17043_;
};
} // namespace esphome::max17043