ESPHome 2025.5.0
Loading...
Searching...
No Matches
automation.h
Go to the documentation of this file.
1#pragma once
2
6
7namespace esphome {
8namespace max6956 {
9
10template<typename... Ts> class SetCurrentGlobalAction : public Action<Ts...> {
11 public:
12 SetCurrentGlobalAction(MAX6956 *max6956) : max6956_(max6956) {}
13
14 TEMPLATABLE_VALUE(uint8_t, brightness_global)
15
16 void play(Ts... x) override {
17 this->max6956_->set_brightness_global(this->brightness_global_.value(x...));
19 }
20
21 protected:
23};
24
25template<typename... Ts> class SetCurrentModeAction : public Action<Ts...> {
26 public:
27 SetCurrentModeAction(MAX6956 *max6956) : max6956_(max6956) {}
28
30
31 void play(Ts... x) override {
32 this->max6956_->set_brightness_mode(this->brightness_mode_.value(x...));
34 }
35
36 protected:
38};
39} // namespace max6956
40} // namespace esphome
virtual void play(Ts... x)=0
void set_brightness_global(uint8_t current)
Definition max6956.cpp:92
void set_brightness_mode(max6956::MAX6956CURRENTMODE brightness_mode)
Definition max6956.cpp:102
TEMPLATABLE_VALUE(uint8_t, brightness_global) void play(Ts... x) override
Definition automation.h:14
TEMPLATABLE_VALUE(max6956::MAX6956CURRENTMODE, brightness_mode) void play(Ts... x) override
Definition automation.h:29
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7
uint16_t x
Definition tt21100.cpp:5