D
p:m1=0
p:g1=0
p:g2=0
p:month1=0
p:month2=0
p:month3=0
p:gesamt=0
c1=0
s1=0
h1=0
hkw1=0
gkw1=0
gkw2=0
mkw1=0
mkw2=0
mkw3=0
mkwgs=0
skw1=0
hgp=0
g1gp=0
g2gp=0
m1gp=0
m2gp=0
m3gp=0
gsgp=0
hr=0
dy=0
zu=0.9636
br=11.537
gp=9.97
gasinit=2937
gastotal=0
> B
> =>sensor53 l255
> S
> h1=s1-m1
> hkw1=h1*br*zu
> hgp=(hkw1*gp)/100
> gkw1=g1*br*zu
> gkw2=g2*br*zu
> mkw1=month1*br*zu
> mkw2=month2*br*zu
> mkw3=month3*br*zu
> mkwgs=gesamt*br*zu
> g1gp=(gkw1*gp)/100
> g2gp=(gkw2*gp)/100
> m1gp=(mkw1*gp)/100
> m2gp=(mkw2*gp)/100
> m3gp=(mkw3*gp)/100
> gsgp=(mkwgs*gp)/100
> skw1=s1*br\*zu
hr=hours
dy=day
if chg\[hr\]>0
and hr==0
then
m1=s1
g2=g1
g1=h1
month1=month1+h1
gesamt=gesamt+h1
if chg\[dy\]<2
and dy==1
then
month3=month2
month2=month1
month1=0
endif
svars
endif
if upsecs%tper==0{
=>Publish tasmota/%topic%/main/td_m3 %2h1%
=>Publish tele/%topic%/main/td_kwh %2hkw1%
=>Publish tele/%topic%/main/yd_m3 %2g1%
=>Publish tele/%topic%/main/yd_kwh %2gkw1%
=>Publish tele/%topic%/main/dbyd_m3 %2g2%
=>Publish tele/%topic%/main/dbyd_kwh %2gkw2%
=>Publish tele/%topic%/main/value %2s1%
=>Publish tele/%topic%/main/gastotal %2gastotal%
=>Publish tele/%topic%/json {“gastotal”: “%2gastotal%”, “value”: “%2s1%”, “today_m3”: “%2h1%”, “today_kwh”: “%2hkw1%”, “yesterday_m3”: “%2g1%”, “yesterday_kwh”: “%2gkw1%”, “db_yesterday_m3”: “%2g2%”, “db_yesterday_kwh”: “%2gkw2%”}
}
> T
> s1=Counter#C1/100
> c1=Counter#C1
> gastotal=(c1/100)+gasinit
> W
> GAS gezählt: {m} %3s1% m³
> Zählerstand: {m} %gastotal% m³
> ============
> Zustandszahl: {m} %zu%
> Brennwert: {m} %br% kWh/m³
> Gaspreis: {m} %gp% Cent/kWh
> ============
> Verbrauch:
---
## Heute: {m} %2h1% m³ | %2hkw1% kWh
Kosten: {m} %2hgp% €
## Gestern: {m} %2g1% m³ | %2gkw1% kWh
Kosten: {m} %2g1gp% €
## Vorgestern: {m} %2g2% m³ | %2gkw2% kWh
Kosten: {m} %2g2gp% €
Aktueller Monat: {m} %2month1% m³ | %2m1gp% €
Letzter Monat: {m} %2month2% m³ | %2m2gp% €
Vorletzter Monat: {m} %2month3% m³ | %2m3gp% €
Gesamt: {m} %2gesamt% m³ | %2gsgp% €
by HarryP: Code-/Logzeilen formatiert (bitte immer in </> einbinden)
s.a.: (Neues Update & Features - Hier in der Community 🫶)