1 #ifdef USE_SWITCH_ONOFF
2 #ifndef _SWITCH_ONOFF_H_
3 #define _SWITCH_ONOFF_H_
32 void begin(
const char* html_place,
const char* label,
const char* mqtt_name,
const char* keyword,
33 bool start_value,
bool on_value,
bool is_state);
44 void begin(
const char* html_place,
const char* label,
const char* mqtt_name,
const char* keyword,
45 bool start_value,
bool on_value,
bool is_state, uint8_t hw_pin);
57 void begin(
const char* html_place,
const char* label,
const char* mqtt_name,
const char* keyword,
58 bool start_value,
bool on_value,
bool is_state, uint8_t hw_pin1, uint8_t hw_pin2);
74 void begin(
const char* html_place,
const char* label,
const char* mqtt_name,
const char* keyword,
75 bool start_value,
bool on_value,
bool is_state, uint8_t slider_val, uint8_t slider_max_val, uint8_t slider_no,
76 const char* slider_label,
const char* slider_mqtt_name,
const char* slider_keyword);
93 void begin(
const char* html_place,
const char* label,
const char* mqtt_name,
const char* keyword,
94 bool start_value,
bool on_value,
bool is_state, uint8_t hw_pin, uint8_t slider_val, uint8_t slider_max_val, uint8_t slider_no,
95 const char* slider_label,
const char* slider_mqtt_name,
const char* slider_keyword);
106 bool set(
const String& _cmnd,
const String& _val);
112 uint8_t get_slider_val();
116 bool get_switch_val();
120 void set_switch(uint8_t _val);
124 void set_slider(uint8_t _val);
128 void set_slider_label(
const char* _label);
132 void set_slider_max_value(uint8_t _val);
136 void do_switch(
bool new_state);
138 void set_hw_pin(uint8_t pin1);
140 void set_hw_pin(uint8_t pin1, uint8_t pin2);
149 bool slider_used =
false;
151 String switch_mqtt_name;
153 String slider_mqtt_name;
155 String slider_keyword;
159 uint8_t slider_value;
161 uint8_t slider_max_value;
165 bool hw_pin1_used =
false;
167 bool hw_pin2_used =
false;
Ein generisches Objekt für einen Sensor/Actor. Achtung: Nicht zum Einbau bestimmt,...
Definition: base_generic.h:12
bool set(const String &_keyword, const String &_value)
Der Komandointerpreter. Hier als leere Funktion implementiert, kann im abgeleiteten Objekt gefüllt we...
Definition: base_generic.cpp:33
void html_init()
Initialisierung einer Webseite Wenn sich ein Browser verbindet und die Webseite des Nodes aufruft,...
Definition: base_generic.cpp:50
void begin(const char *_html_place, const char *_label)
Legt die Startkonfiguration des Sensors fest. Die übergebenen Variabelen werden in die entsprechenden...
Definition: base_generic.cpp:9