ESPHome  2024.12.2
automation.h
Go to the documentation of this file.
1 #pragma once
2 
6 
7 namespace esphome {
8 namespace max6956 {
9 
10 template<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 
25 template<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
uint16_t x
Definition: tt21100.cpp:17
TEMPLATABLE_VALUE(uint8_t, brightness_global) void play(Ts... x) override
Definition: automation.h:14
void set_brightness_mode(max6956::MAX6956CURRENTMODE brightness_mode)
Definition: max6956.cpp:102
void set_brightness_global(uint8_t current)
Definition: max6956.cpp:92
SetCurrentModeAction(MAX6956 *max6956)
Definition: automation.h:27
Implementation of SPI Controller mode.
Definition: a01nyub.cpp:7
virtual void play(Ts... x)=0
TEMPLATABLE_VALUE(max6956::MAX6956CURRENTMODE, brightness_mode) void play(Ts... x) override
Definition: automation.h:29