52 lines
1.2 KiB
Python
52 lines
1.2 KiB
Python
"""Map wM-Bus 3-letter FLAG manufacturer codes to full names.
|
|
|
|
The DLL header only carries the 3-letter FLAG code (e.g. "KAM"). This is a
|
|
best-effort lookup of common metering manufacturers; unknown codes fall back
|
|
to the code itself.
|
|
"""
|
|
|
|
_FLAG = {
|
|
"ABB": "ABB",
|
|
"AMT": "Aquametro",
|
|
"APA": "Apator",
|
|
"APT": "Apator",
|
|
"BME": "BMeters",
|
|
"BME": "BMeters",
|
|
"DME": "Diehl Metering",
|
|
"DWZ": "Lorenz",
|
|
"EFE": "Engelmann",
|
|
"ELS": "Elster",
|
|
"ELV": "Elvaco",
|
|
"EMH": "EMH Metering",
|
|
"ESY": "EasyMeter",
|
|
"GAV": "Carlo Gavazzi",
|
|
"GWF": "GWF",
|
|
"HYD": "Diehl (Hydrometer)",
|
|
"INE": "Innotas",
|
|
"ITW": "Itron",
|
|
"ITR": "Itron",
|
|
"KAM": "Kamstrup",
|
|
"KAW": "Kamstrup",
|
|
"LUG": "Landis+Gyr",
|
|
"LGB": "Landis+Gyr",
|
|
"MAD": "Maddalena",
|
|
"MTR": "Metrona",
|
|
"NZR": "NZR",
|
|
"QDS": "Qundis",
|
|
"REL": "Relay",
|
|
"RKE": "Viterra / Ista",
|
|
"SAP": "Sappel",
|
|
"SEN": "Sensus",
|
|
"SON": "Sontex",
|
|
"SPX": "Spanner-Pollux",
|
|
"TCH": "Techem",
|
|
"WEP": "Weptech",
|
|
"ZRI": "Zenner",
|
|
}
|
|
|
|
|
|
def manufacturer_name(code: str) -> str:
|
|
if not code:
|
|
return ""
|
|
return _FLAG.get(code.upper(), code.upper())
|