Skip to content

Commit

Permalink
Add score sensor
Browse files Browse the repository at this point in the history
  • Loading branch information
Ernst79 committed Sep 22, 2023
1 parent ff339ee commit 6f7994d
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
20 changes: 16 additions & 4 deletions custom_components/ble_monitor/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -809,6 +809,18 @@ class BLEMonitorBinarySensorEntityDescription(
suggested_display_precision=0,
state_class=SensorStateClass.MEASUREMENT,
),
BLEMonitorSensorEntityDescription(
key="score",
sensor_class="StateChangedSensor",
update_behavior="StateChange",
name="ble score",
unique_id="sco_",
icon="mdi:counter",
native_unit_of_measurement=None,
device_class=None,
suggested_display_precision=0,
state_class=SensorStateClass.MEASUREMENT,
),
BLEMonitorSensorEntityDescription(
key="air quality",
sensor_class="StateChangedSensor",
Expand Down Expand Up @@ -1181,9 +1193,9 @@ class BLEMonitorBinarySensorEntityDescription(
'MUE4094RT' : [["rssi"], [], ["motion"]],
'RTCGQ02LM' : [["battery", "rssi"], ["button"], ["light", "motion"]],
'MMC-T201-1' : [["temperature", "battery", "rssi"], [], []],
'M1S-T500' : [["battery", "rssi"], [], ["toothbrush"]],
'T700' : [["consumable", "battery", "rssi"], [], ["toothbrush"]],
'T700i' : [["consumable", "battery", "rssi"], [], ["toothbrush"]],
'M1S-T500' : [["score", "battery", "rssi"], [], ["toothbrush"]],
'T700' : [["consumable", "score", "battery", "rssi"], [], ["toothbrush"]],
'T700i' : [["consumable", "score", "battery", "rssi"], [], ["toothbrush"]],
'ZNMS16LM' : [["battery", "rssi"], [], ["lock", "door", "fingerprint", "armed away"]],
'ZNMS17LM' : [["battery", "rssi"], [], ["lock", "door", "fingerprint", "antilock", "childlock", "armed away"]],
'MJZNMSQ01YD' : [["battery", "rssi"], [], ["lock", "fingerprint"]],
Expand Down Expand Up @@ -1348,7 +1360,7 @@ class BLEMonitorBinarySensorEntityDescription(
'K9B-1BTN' : 'Linptech',
'K9B-2BTN' : 'Linptech',
'K9B-3BTN' : 'Linptech',
'K9BB-1BTN' : 'Linptech',
'K9BB-1BTN' : 'Linptech',
'MS1BB(MI)' : 'Linptech',
'HS1BB(MI)' : 'Linptech',
'XMWXKG01YL' : 'Xiaomi',
Expand Down
2 changes: 1 addition & 1 deletion custom_components/ble_monitor/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@
"btsocket>=0.2.0",
"pyric>=0.1.6.3"
],
"version": "12.4.1"
"version": "12.5.0"
}
1 change: 1 addition & 0 deletions custom_components/ble_monitor/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,7 @@ class BaseSensor(RestoreSensor, SensorEntity):
# | | |**major
# | | |**minor
# | | |**count
# | | |**score
# | | |**air quality
# | |--AccelerationSensor (Class)
# | | |**acceleration
Expand Down

0 comments on commit 6f7994d

Please sign in to comment.