-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a function to get name of meter model by model ID.
- Loading branch information
1 parent
0cb2fca
commit 3c3bf72
Showing
3 changed files
with
14 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# file generated by setuptools_scm | ||
# don't change, don't track in version control | ||
__version__ = version = '2.1.0' | ||
__version_tuple__ = version_tuple = (2, 1, 0) | ||
__version__ = version = '2.1.1' | ||
__version_tuple__ = version_tuple = (2, 1, 1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,13 @@ | ||
"""Helpers and utils.""" | ||
from __future__ import annotations | ||
|
||
from const import REGIONS, UNKNOWN | ||
from const import REGIONS, METER_MODELS, UNKNOWN | ||
|
||
|
||
def get_region_name(region_id: int) -> str: | ||
region_name = REGIONS.get(region_id, f'{UNKNOWN} <{region_id}>') | ||
return region_name | ||
|
||
|
||
def get_model_name(model_id: int) -> str: | ||
return METER_MODELS.get(model_id, f'{UNKNOWN} <{model_id}>') |