blob: 5b45ecb71122f576734dd1b1ae7f752f627e7131 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
from .base_payload import MqttPayload
two_digits_precision = lambda x: round(x, 2)
class TempHumDataPayload(MqttPayload):
FORMAT = '=dd'
UNPACKER = {
'temp': two_digits_precision,
'rh': two_digits_precision
}
temp: float
rh: float
|