1#ifndef SENSESP_SYSTEM_RGB_LED_H
2#define SENSESP_SYSTEM_RGB_LED_H
50 RgbLed(
int led_r_pin = -1,
int led_g_pin = -1,
int led_b_pin = -1,
51 String config_path =
"",
long int led_on_rgb = 0x00FF00,
52 long int led_off_rgb = 0xFF0000,
bool common_anode =
true);
76 virtual bool to_json(JsonObject& root)
override;
77 virtual bool from_json(
const JsonObject& config)
override;
Provides an easy way of calling a function based on the output of any ValueProducer.
A special device object that can be used to control a multi-channel color rgb LED light using up to 3...
RgbLed(int led_r_pin=-1, int led_g_pin=-1, int led_b_pin=-1, String config_path="", long int led_on_rgb=0x00FF00, long int led_off_rgb=0xFF0000, bool common_anode=true)
LambdaConsumer< long > rgb_consumer_
void set_color(long new_value)
std::shared_ptr< PWMOutput > led_g_output_
virtual bool from_json(const JsonObject &config) override
virtual bool to_json(JsonObject &root) override
LambdaConsumer< bool > on_off_consumer_
std::shared_ptr< PWMOutput > led_b_output_
std::shared_ptr< PWMOutput > led_r_output_
const String ConfigSchema(const SmartSwitchController &obj)