code cleanup

This commit is contained in:
Philipp Wo 2023-04-17 10:38:36 +02:00
parent 2fed8b51ec
commit 4511924730
1 changed files with 10 additions and 8 deletions

View File

@ -58,12 +58,17 @@ mqtt:
then:
# Debug
- lambda: |-
const char * c = x["color"];
const char * e = x["effect"];
const char * s = x["speed"];
const char * cnt = x["count"];
std::string scol = x["color"];
std::string seff = x["effect"];
std::string sspd = x["speed"];
std::string scnt = x["count"];
ESP_LOGD("main", "Cmd: Color:%s | Effect: %s | Speed:%s | Count:%s", c,e,s,cnt);
const char * col = scol.c_str();
const char * eff = seff.c_str();
const char * spd = sspd.c_str();
const char * cnt = scnt.c_str();
ESP_LOGD("main", "JSON Cmd received: Color: %s | Effect: %s | Speed:%s | Count:%s", col, eff, spd , cnt);
- fingerprint_grow.aura_led_control:
state: !lambda |-
std::string str = x["effect"];
@ -168,7 +173,6 @@ mqtt:
payload: |-
root["led_state"] = id(led_state).state;
root["color"] = id(led_color).state;
# Fingerpint functions
text_sensor:
@ -262,7 +266,6 @@ text_sensor:
- platform: template
name: "LED state"
id: led_state
#########################
@ -300,7 +303,6 @@ binary_sensor:
device_class: window
filters:
- delayed_on: 10ms
# BUTTONS
button: