Skip to content

Commit 94d5bd4

Browse files
committed
add 3 tank sensors
1 parent 83dc355 commit 94d5bd4

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

custom_components/ble_monitor/const.py

+39
Original file line numberDiff line numberDiff line change
@@ -1038,6 +1038,42 @@ class BLEMonitorBinarySensorEntityDescription(
10381038
suggested_display_precision=1,
10391039
state_class=SensorStateClass.MEASUREMENT,
10401040
),
1041+
BLEMonitorSensorEntityDescription(
1042+
key="fresh tank",
1043+
sensor_class="MeasuringSensor",
1044+
update_behavior="Averaging",
1045+
name="fresh tank",
1046+
unique_id="fresh_tank_",
1047+
icon="mdi:storage-tank-outline",
1048+
native_unit_of_measurement=PERCENTAGE,
1049+
device_class=None,
1050+
suggested_display_precision=0,
1051+
state_class=SensorStateClass.MEASUREMENT,
1052+
),
1053+
BLEMonitorSensorEntityDescription(
1054+
key="black tank",
1055+
sensor_class="MeasuringSensor",
1056+
update_behavior="Averaging",
1057+
name="black tank",
1058+
unique_id="black_tank_",
1059+
icon="mdi:storage-tank-outline",
1060+
native_unit_of_measurement=PERCENTAGE,
1061+
device_class=None,
1062+
suggested_display_precision=0,
1063+
state_class=SensorStateClass.MEASUREMENT,
1064+
),
1065+
BLEMonitorSensorEntityDescription(
1066+
key="grey tank",
1067+
sensor_class="MeasuringSensor",
1068+
update_behavior="Averaging",
1069+
name="grey tank",
1070+
unique_id="gray_tank_",
1071+
icon="mdi:storage-tank-outline",
1072+
native_unit_of_measurement=PERCENTAGE,
1073+
device_class=None,
1074+
suggested_display_precision=0,
1075+
state_class=SensorStateClass.MEASUREMENT,
1076+
),
10411077
BLEMonitorSensorEntityDescription(
10421078
key="aqi",
10431079
sensor_class="MeasuringSensor",
@@ -2000,6 +2036,7 @@ class BLEMonitorBinarySensorEntityDescription(
20002036
"acceleration",
20012037
"ambient temperature",
20022038
"battery",
2039+
"black tank",
20032040
"button",
20042041
"co2",
20052042
"conductivity",
@@ -2012,8 +2049,10 @@ class BLEMonitorBinarySensorEntityDescription(
20122049
"duration",
20132050
"energy",
20142051
"flow",
2052+
"fresh tank",
20152053
"gas",
20162054
"gravity",
2055+
"grey tank",
20172056
"gyroscope",
20182057
"humidity",
20192058
"illuminance",

custom_components/ble_monitor/sensor.py

+1
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,7 @@ class BaseSensor(RestoreSensor, SensorEntity):
337337
# | |**flow
338338
# | |**gas
339339
# | |**water
340+
# | |**fresh/grey/black tank
340341
# |--InstantUpdateSensor (Class)
341342
# | |**consumable
342343
# | |**heart rate

0 commit comments

Comments
 (0)