Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Liontron battery detection #146

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions custom_components/bms_ble/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@
{
"manufacturer_id": 8856,
"service_uuid": "0000ff00-0000-1000-8000-00805f9b34fb"
},
{
"manufacturer_id": 15984,
"service_uuid": "0000ff00-0000-1000-8000-00805f9b34fb"
},
{
"local_name": "SP0*",
Expand Down
4 changes: 2 additions & 2 deletions custom_components/bms_ble/plugins/jbd_bms.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ def matcher_dict_list() -> list[dict[str, Any]]:
] + [
{ # ECO-WORTHY LiFePO4 12V 100Ah
"service_uuid": BMS.uuid_services()[0],
"manufacturer_id": 0x2298,
"manufacturer_id": manufacturer_id,
"connectable": True,
}
} for manufacturer_id in [0x2298, 0x3e70]
]

@staticmethod
Expand Down
8 changes: 8 additions & 0 deletions tests/advertisement_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,4 +209,12 @@
),
"jbd_bms",
),
( # source bluetoothctl (https://github.com/patman15/BMS_BLE-HA/issues/134)
generate_advertisement_data( # https://liontron.com/download/german/LISMART1240LX.pdf
service_uuids=["0000ff00-0000-1000-8000-00805f9b34fb"],
manufacturer_data={15984: "\x97\xd1\xc1\x8c"}, # MAC address
rssi=-53,
),
"jbd_bms",
),
]
Loading