ch.eick: Add LogDBRep_WR_ctl_SQL

git-svn-id: https://svn.fhem.de/fhem/trunk@28508 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
ch.eick
2024-02-12 12:30:48 +00:00
parent 67f8ea1620
commit 9b28d99d50

View File

@@ -0,0 +1,5 @@
defmod LogDBRep_WR_ctl_SQL DbRep LogDB
attr LogDBRep_WR_ctl_SQL DbLogExclude .*
attr LogDBRep_WR_ctl_SQL room System
setstate LogDBRep_WR_ctl_SQL 2023-11-26 07:51:15 sqlCmd SELECT VALUE FROM history WHERE DEVICE='WR_0_KSEM' AND READING='Active_energy+' AND TIMESTAMP > curdate() - interval 1 month AND TIMESTAMP <= LAST_DAY(SUBDATE(curdate(), INTERVAL 1 MONTH)) ORDER BY TIMESTAMP desc LIMIT 1;;