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

Fix device_model parsing for multiple braces #1449

Merged
merged 1 commit into from
Nov 7, 2024

Conversation

cygnusb
Copy link
Contributor

@cygnusb cygnusb commented Nov 7, 2024

only get last value in braces.

model description can also contain braces. Example Bosch: Room thermostat II (Battery model) (BTH-RM)

Motivation:

Devices can have multiple braces due to vendor having something like (Battery model) appended. See device info in comment: #1422 (comment)

Changes:

Fix regexp to extract value within last braces and return that value.

Related issue (check one):

  • fixes #
  • there is no related issue ticket

Checklist (check one):

  • I did not change any code (e.g. documentation changes)
  • The code change is tested and works locally.

Test-Hardware list (for code changes)

HA Version: 2024.11.0
Zigbee2MQTT Version: 1.41.0
TRV Hardware: Bosch Room Thermostat II

only get last value in braces. model description can also contain braces.
Example Bosch: Room thermostat II (Battery model) (BTH-RM)
@KartoffelToby KartoffelToby merged commit 94aab87 into KartoffelToby:master Nov 7, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants