Skip to content

Commit

Permalink
Fix O-1PST not having model name (#173)
Browse files Browse the repository at this point in the history
  • Loading branch information
joostlek authored Aug 10, 2024
1 parent 9174689 commit edbeab6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/airgradient/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def get_model_name(model_id: str) -> str | None:
"""Get model name from identifier."""
if model_id.startswith("I-9PSL"):
return "AirGradient ONE"
if model_id.startswith("O-1PPT"):
if model_id.startswith("O-1"):
return "AirGradient Open Air"
if "DIY" in model_id:
return "AirGradient DIY"
Expand Down
1 change: 1 addition & 0 deletions tests/test_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
("I-9PSL", "AirGradient ONE"),
("I-9PSL-DE", "AirGradient ONE"),
("O-1PPT", "AirGradient Open Air"),
("O-1PST", "AirGradient Open Air"),
("DIY-PRO-4.3", "AirGradient DIY"),
("DIY-PRO-3.7", "AirGradient DIY"),
("DIY-BASIC-4.0", "AirGradient DIY"),
Expand Down

0 comments on commit edbeab6

Please sign in to comment.