Skip to content

Commit ec54981

Browse files
.gitignore - add __pycache__
1 parent f0deb6f commit ec54981

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
src/micropython.py
1+
src/micropython.py
2+
src/__pycache__

src/bthome.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ class BTHome:
4545
TVOC_UINT16 = const(0x13)
4646
MOISTURE_UINT16 = const(0x14)
4747
HUMIDITY_UINT8 = const(0x2E)
48+
MOISTURE_UINT8 = const(0x2F)
49+
COUNT_UINT16 = const(0x3D)
4850

4951
# There is more than one way to represent most sensor properties. This
5052
# dictionary maps the object id to the property name.
@@ -66,7 +68,9 @@ class BTHome:
6668
CO2_UINT16: "co2",
6769
TVOC_UINT16: "tvoc",
6870
MOISTURE_UINT16: "moisture",
69-
HUMIDITY_UINT8: "humidity"
71+
HUMIDITY_UINT8: "humidity",
72+
MOISTURE_UINT8: "moisture",
73+
COUNT_UINT16: "count"
7074
}
7175

7276
# See "Sensor Data" table at https://bthome.io/format/ Property column.
@@ -176,7 +180,9 @@ def _pack_uint24_x1000(self, object_id, value):
176180
CO2_UINT16: _pack_uint16_x1,
177181
TVOC_UINT16: _pack_uint16_x1,
178182
MOISTURE_UINT16: _pack_uint16_x100,
179-
HUMIDITY_UINT8: _pack_uint8_x1
183+
HUMIDITY_UINT8: _pack_uint8_x1,
184+
MOISTURE_UINT8: _pack_uint8_x1,
185+
COUNT_UINT16: _pack_uint16_x1
180186
}
181187

182188
# Concatenate an arbitrary number of sensor readings using parameters

0 commit comments

Comments
 (0)