From eb1d86948c8b3f0ee7dba00b9564c227e0fdb88a Mon Sep 17 00:00:00 2001 From: Robin Dietzel Date: Thu, 2 Feb 2023 17:07:35 +0100 Subject: [PATCH] Added comment --- net/tastmota-rules.txt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/net/tastmota-rules.txt b/net/tastmota-rules.txt index 99a05c4..b6034be 100644 --- a/net/tastmota-rules.txt +++ b/net/tastmota-rules.txt @@ -8,14 +8,15 @@ rule1 ON SerialReceived#HourlyHist DO var7 %value% ENDON ON SerialReceived#DailyHist DO var8 %value% ENDON ON SerialReceived#Status DO publish /floatpump-stats {"Status": "%var1%", "TankLevel": "%var2%", "TankPump": "%var3%", "RefillPump": "%var4%", "RefillEmpty": "%var5%", "RefillCooldown": "%var6%", "HourlyHist": "%var7%", "DailyHist": "%var8%"} ENDON - rule1 1 rule2 ON System#Boot DO SerialBuffer 520 ENDON - rule2 1 +//This Rule wont work -> ist too long +//Either paste single pulish lines once or configure device via yaml + rule3 ON System#Boot DO publish homeassistant/binary_sensor/floatpump1/config {"name": "FloatPump Controller Status", "unique_id": "floatpump-status", "state_topic": "/floatpump-stats", "payload_on": "TRUE", "payload_off": "FALSE", "value_template": "{{ value_json.Status }}", "device": { "name": "FloatPUMP Controller", "mf": "Robin Dietzel (robtor.de)", "cns": [["mac", "BC:DD:C2:26:39:36"]] }} ENDON ON System#Boot DO publish homeassistant/binary_sensor/floatpump2/config {"name": "Tank Pump", "unique_id": "floatpump-tankpump-status", "icon": "mdi:water-pump", "state_topic": "/floatpump-stats", "payload_on": "TRUE", "payload_off": "FALSE", "value_template": "{{ value_json.TankPump }}", "device": { "name": "FloatPUMP Controller", "mf": "Robin Dietzel (robtor.de)", "cns": [["mac", "BC:DD:C2:26:39:36"]] }} ENDON @@ -25,6 +26,4 @@ rule3 ON System#Boot DO publish homeassistant/sensor/floatpump6/config {"name": "Refill Cooldown", "unique_id": "floatpump-refillcooldown", "icon": "mdi:clock-alert-outline", "unit_of_measurement": "min", "state_topic": "/floatpump-stats", "value_template": "{{ value_json.RefillCooldown }}", "device": { "name": "FloatPUMP Controller", "mf": "Robin Dietzel (robtor.de)", "cns": [["mac", "BC:DD:C2:26:39:36"]] }} ENDON ON System#Boot DO publish homeassistant/sensor/floatpump7/config {"name": "Hourly Stats", "unique_id": "floatpump-hourly-stats", "icon": "mdi:chart-line", "unit_of_measurement": "%", "state_topic": "/floatpump-stats", "value_template": "{{ value_json.HourlyHist }}", "device": { "name": "FloatPUMP Controller", "mf": "Robin Dietzel (robtor.de)", "cns": [["mac", "BC:DD:C2:26:39:36"]] }} ENDON ON System#Boot DO publish homeassistant/sensor/floatpump8/config {"name": "Daily Stats", "unique_id": "floatpump-daily-stats", "icon": "mdi:chart-line", "unit_of_measurement": "%", "state_topic": "/floatpump-stats", "value_template": "{{ value_json.DailyHist }}", "device": { "name": "FloatPUMP Controller", "mf": "Robin Dietzel (robtor.de)", "cns": [["mac", "BC:DD:C2:26:39:36"]] }} ENDON - - rule3 1 \ No newline at end of file