Update D20.be (#23722)

Whoops: Forgot to add Battery Voltage to MQTT originally
This commit is contained in:
UBWH 2025-07-27 13:15:25 +08:00 committed by GitHub
parent 48c482d169
commit 44a137773d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -34,10 +34,12 @@ class LwDecoDrgD20
## SENSOR DATA ##
if 2 == FPort && Bytes.size() == 11
last_seen = tasmota.rtc('local')
var mode=(Bytes[6] & 0x7C)>>2
if 3==mode
battery = (Bytes[0]<<8 | Bytes[1])/1000
data.insert("BattV", battery)
battery_last_seen = tasmota.rtc('local')
# 0x07FF = 2047 = no temp sensor