Skip to content

Commit

Permalink
Fix versiontuple for x.x.x-dev versions
Browse files Browse the repository at this point in the history
Fix for #12
  • Loading branch information
myhomeiot committed Jul 5, 2022
1 parent 0dde8f5 commit a62b685
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/myhomeiot_ble_client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def versiontuple(v):
async def to_code(config):
var = cg.new_Pvariable(config[CONF_ID])

reversed = versiontuple(const.__version__) >= versiontuple("2021.9.0")
reversed = versiontuple(const.__version__.split("-")[0]) >= versiontuple("2021.9.0")
if len(config[CONF_SERVICE_UUID]) == len(esp32_ble_tracker.bt_uuid16_format):
cg.add(var.set_service_uuid16(esp32_ble_tracker.as_hex(config[CONF_SERVICE_UUID])))
elif len(config[CONF_SERVICE_UUID]) == len(esp32_ble_tracker.bt_uuid32_format):
Expand Down

0 comments on commit a62b685

Please sign in to comment.