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: then:
# Debug # Debug
- lambda: |- - lambda: |-
const char * c = x["color"]; std::string scol = x["color"];
const char * e = x["effect"]; std::string seff = x["effect"];
const char * s = x["speed"]; std::string sspd = x["speed"];
const char * cnt = x["count"]; 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: - fingerprint_grow.aura_led_control:
state: !lambda |- state: !lambda |-
std::string str = x["effect"]; std::string str = x["effect"];
@ -168,7 +173,6 @@ mqtt:
payload: |- payload: |-
root["led_state"] = id(led_state).state; root["led_state"] = id(led_state).state;
root["color"] = id(led_color).state; root["color"] = id(led_color).state;
# Fingerpint functions # Fingerpint functions
text_sensor: text_sensor:
@ -262,7 +266,6 @@ text_sensor:
- platform: template - platform: template
name: "LED state" name: "LED state"
id: led_state id: led_state
######################### #########################
@ -300,7 +303,6 @@ binary_sensor:
device_class: window device_class: window
filters: filters:
- delayed_on: 10ms - delayed_on: 10ms
# BUTTONS # BUTTONS
button: button: