joba-1 / Tasmoticz

Domoticz MQTT autodiscovery plugin for Tasmota devices
MIT License
24 stars 18 forks source link

typeDb contains keys in different languages #49

Open HedgU4 opened 1 week ago

HedgU4 commented 1 week ago

it is weird why some keys in variable typeDb are in English and some are in German such as zählerstand_total Do you have a plan to make all of them in one style?

typeDb = {
        'Temperature':   {'Name': 'Temperatur',      'Unit': '°C',   'DomoType': 'Temperature'},
        'Humidity':      {'Name': 'Feuchtigkeit',    'Unit': '%',    'DomoType': 'Humidity'},
        'Pressure':      {'Name': 'Luftdruck',       'Unit': 'hPa',  'DomoType': 'Barometer'},
        'Illuminance':   {'Name': 'Helligkeit',      'Unit': 'lux',  'DomoType': 'Illumination'},
        'Distance':      {'Name': 'Abstand',         'Unit': 'mm ',  'DomoType': 'Distance'},
        'UvLevel':       {'Name': 'UV Level',        'Unit': 'raw',  'DomoType': 'Custom'},
        'UvIndex':       {'Name': 'UV Index',        'Unit': 'UVI',  'DomoType': 'Custom'},
        'UvPower':       {'Name': 'UV Leistung',     'Unit': 'W/m²', 'DomoType': 'Custom'},
        'Total':         {'Name': 'Gesamt',          'Unit': 'kWh',  'DomoType': '113;0;0'},
        'Yesterday':     {'Name': 'Gestern',         'Unit': 'kWh',  'DomoType': 'Custom'},
        'Today':         {'Name': 'Heute',           'Unit': 'kWh',  'DomoType': 'Custom'},
        'Power':         {'Name': 'Leistung',        'Unit': 'kW',   'DomoType': 'Usage'},
        'ApparentPower': {'Name': 'Scheinleistung',  'Unit': 'kW',   'DomoType': 'Usage'},
        'ReactivePower': {'Name': 'Blindleistung',   'Unit': 'kW',   'DomoType': 'Usage'},
        'Factor':        {'Name': 'Leistungsfaktor', 'Unit': 'W/VA', 'DomoType': 'Custom'},
        'Frequency':     {'Name': 'Frequenz',        'Unit': 'Hz',   'DomoType': 'Custom'},
        'Voltage':       {'Name': 'Spannung',        'Unit': 'V',    'DomoType': 'Voltage'},
        'Current':       {'Name': 'Strom',           'Unit': 'A',    'DomoType': 'Current (Single)'},
        'zählerstand_total':     {'Name':'Total Usage',  'Unit':'KWh', 'DomoType': '113;0;0'},
        'zählerstand_tarif_1':   {'Name':'Tarif1 Usage', 'Unit':'KWh', 'DomoType': '113;0;0'},
        'zählerstand_tarif_2':   {'Name':'Tarif2 Usage', 'Unit':'KWh', 'DomoType': '113;0;0'},
        'aktuelle_wirkleistung': {'Name': 'Usage Total', 'Unit':' W',  'DomoType': 'Usage'},
        'wirkleistung_l1':       {'Name': 'Usage l1',    'Unit':' W',  'DomoType': 'Usage'},
        'wirkleistung_l2':       {'Name': 'Usage l2',    'Unit':' W',  'DomoType': 'Usage'},
        'wirkleistung_l3':       {'Name': 'Usage l3',    'Unit':' W',  'DomoType': 'Usage'}
    }
joba-1 commented 1 week ago

I agree, it is weird.

The pr that added the entries is from someone else and I don’t have sensors using them.

I don’t plan to change it but I would (or accept changes) if the author agrees.

The intention is for the key to not change and for the Name item to be german (other translations or a way to detect browser language welcome)

HedgU4 commented 1 week ago

OK, I'll try to provide PR with translation support.