Log output changed to console instead of mqtt
This commit is contained in:
parent
b860d50d23
commit
2fed8b51ec
|
@ -56,25 +56,14 @@ mqtt:
|
|||
on_json_message:
|
||||
topic: $devicename/led/command
|
||||
then:
|
||||
- if:
|
||||
condition:
|
||||
not:
|
||||
# todo check json length
|
||||
text_sensor.state:
|
||||
id: fingerprint_state
|
||||
state: "cancelling enrollment"
|
||||
then:
|
||||
# default values speed count
|
||||
- text_sensor.template.publish:
|
||||
id: mqtt_json
|
||||
state: !lambda |-
|
||||
std::string color = x["color"];
|
||||
std::string effect = x["effect"];
|
||||
std::string speed = x["speed"];
|
||||
std::string count = x["count"];
|
||||
|
||||
return "Color:" + color + " Effekt:" + effect + " Speed:" + speed + " Count:" + count;
|
||||
# Debug
|
||||
- lambda: |-
|
||||
const char * c = x["color"];
|
||||
const char * e = x["effect"];
|
||||
const char * s = x["speed"];
|
||||
const char * cnt = x["count"];
|
||||
|
||||
ESP_LOGD("main", "Cmd: Color:%s | Effect: %s | Speed:%s | Count:%s", c,e,s,cnt);
|
||||
- fingerprint_grow.aura_led_control:
|
||||
state: !lambda |-
|
||||
std::string str = x["effect"];
|
||||
|
@ -263,13 +252,9 @@ text_sensor:
|
|||
count: 6
|
||||
|
||||
- platform: template
|
||||
name: "Log Message"
|
||||
name: "Fingerprint Log"
|
||||
id: fingerprint_state
|
||||
|
||||
- platform: template
|
||||
name: "MQTT Message"
|
||||
id: mqtt_json
|
||||
|
||||
- platform: template
|
||||
name: "LED color"
|
||||
id: led_color
|
||||
|
@ -301,8 +286,8 @@ binary_sensor:
|
|||
filters:
|
||||
- invert:
|
||||
- delayed_on: 20ms
|
||||
- delayed_off: 100ms
|
||||
- delayed_on_off: 500ms
|
||||
- delayed_off: 400ms
|
||||
- delayed_on_off: 100ms
|
||||
|
||||
# Door Sensor - GPIO connected to GND over reed sensor
|
||||
- platform: gpio
|
||||
|
|
Loading…
Reference in New Issue