Skip to content

Commit

Permalink
Fix model matching for white doorbells
Browse files Browse the repository at this point in the history
  • Loading branch information
AT0myks committed Nov 18, 2024
1 parent c6ee230 commit 866e4a7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion common.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@ def get_item_index(items: Iterable[Mapping[str, Any]], key: str, value: Any) ->


def clean_model(model: str) -> str:
return model.removesuffix("-5MP").removesuffix(" (NVR)").replace(' ', '-').lower()
return model \
.removesuffix("-5MP") \
.removesuffix(" (NVR)") \
.split('\uff08')[0] \
.replace(' ', '-') \
.lower()


def clean_hw_ver(hw_ver: str) -> str:
Expand Down

0 comments on commit 866e4a7

Please sign in to comment.