Skip to content

Commit

Permalink
add 3 tank sensors
Browse files Browse the repository at this point in the history
  • Loading branch information
Ernst79 committed Feb 26, 2024
1 parent 83dc355 commit 94d5bd4
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
39 changes: 39 additions & 0 deletions custom_components/ble_monitor/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -1038,6 +1038,42 @@ class BLEMonitorBinarySensorEntityDescription(
suggested_display_precision=1,
state_class=SensorStateClass.MEASUREMENT,
),
BLEMonitorSensorEntityDescription(
key="fresh tank",
sensor_class="MeasuringSensor",
update_behavior="Averaging",
name="fresh tank",
unique_id="fresh_tank_",
icon="mdi:storage-tank-outline",
native_unit_of_measurement=PERCENTAGE,
device_class=None,
suggested_display_precision=0,
state_class=SensorStateClass.MEASUREMENT,
),
BLEMonitorSensorEntityDescription(
key="black tank",
sensor_class="MeasuringSensor",
update_behavior="Averaging",
name="black tank",
unique_id="black_tank_",
icon="mdi:storage-tank-outline",
native_unit_of_measurement=PERCENTAGE,
device_class=None,
suggested_display_precision=0,
state_class=SensorStateClass.MEASUREMENT,
),
BLEMonitorSensorEntityDescription(
key="grey tank",
sensor_class="MeasuringSensor",
update_behavior="Averaging",
name="grey tank",
unique_id="gray_tank_",
icon="mdi:storage-tank-outline",
native_unit_of_measurement=PERCENTAGE,
device_class=None,
suggested_display_precision=0,
state_class=SensorStateClass.MEASUREMENT,
),
BLEMonitorSensorEntityDescription(
key="aqi",
sensor_class="MeasuringSensor",
Expand Down Expand Up @@ -2000,6 +2036,7 @@ class BLEMonitorBinarySensorEntityDescription(
"acceleration",
"ambient temperature",
"battery",
"black tank",
"button",
"co2",
"conductivity",
Expand All @@ -2012,8 +2049,10 @@ class BLEMonitorBinarySensorEntityDescription(
"duration",
"energy",
"flow",
"fresh tank",
"gas",
"gravity",
"grey tank",
"gyroscope",
"humidity",
"illuminance",
Expand Down
1 change: 1 addition & 0 deletions custom_components/ble_monitor/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,7 @@ class BaseSensor(RestoreSensor, SensorEntity):
# | |**flow
# | |**gas
# | |**water
# | |**fresh/grey/black tank
# |--InstantUpdateSensor (Class)
# | |**consumable
# | |**heart rate
Expand Down

0 comments on commit 94d5bd4

Please sign in to comment.