Config changes for new HA version: KNX sensor "address" to "state_address"
This commit is contained in:
parent
243f6f1155
commit
93254b24b9
|
@ -68,7 +68,7 @@ def create_power_plug(device_info: List[DeviceInfo],
|
|||
if counter_value:
|
||||
result['sensor'].append({
|
||||
'name': entry.display_name + " Betriebsstunden",
|
||||
'address': counter_value,
|
||||
'state_address': counter_value,
|
||||
'type': '2byte_unsigned',
|
||||
})
|
||||
counter_reset = csv_contents.get(entry.csv_name + postfix_counter_reset, None)
|
||||
|
@ -83,7 +83,7 @@ def create_power_plug(device_info: List[DeviceInfo],
|
|||
if consumption:
|
||||
result['sensor'].append({
|
||||
'name': entry.display_name + " Verbrauch mA",
|
||||
'address': consumption,
|
||||
'state_address': consumption,
|
||||
'type': 'DPT-9',
|
||||
})
|
||||
name = name_to_id(entry.display_name + " Verbrauch mA", 'sensor')
|
||||
|
@ -99,7 +99,7 @@ def create_power_plug(device_info: List[DeviceInfo],
|
|||
if consumption_sum:
|
||||
result['sensor'].append({
|
||||
'name': entry.display_name + " Verbrauch Summe",
|
||||
'address': consumption_sum,
|
||||
'state_address': consumption_sum,
|
||||
'type': '4byte_unsigned',
|
||||
})
|
||||
consumption_reset = csv_contents.get(entry.csv_name + postfix_consumption_reset, None)
|
||||
|
|
|
@ -84,43 +84,43 @@ def add_knx_devices(devices, groups):
|
|||
'sensor': [
|
||||
# Brightness
|
||||
{'name': 'Gang Bewegungsmelder West Helligkeit',
|
||||
'address': imported_csv['BewegungsmelderWest Helligkeit'],
|
||||
'state_address': imported_csv['BewegungsmelderWest Helligkeit'],
|
||||
'type': 'illuminance'},
|
||||
{'name': 'Gang Bewegungsmelder Mitte Helligkeit',
|
||||
'address': imported_csv['BewegungsmelderMitte Helligkeit'],
|
||||
'state_address': imported_csv['BewegungsmelderMitte Helligkeit'],
|
||||
'type': 'illuminance'},
|
||||
{'name': 'Gang Bewegungsmelder Ost Helligkeit',
|
||||
'address': imported_csv['BewegungsmelderOst Helligkeit'],
|
||||
'state_address': imported_csv['BewegungsmelderOst Helligkeit'],
|
||||
'type': 'illuminance'},
|
||||
# Temperature
|
||||
{'name': 'Esszimmer Temperatur',
|
||||
'address': imported_csv['TemperaturEsszimmer'],
|
||||
'state_address': imported_csv['TemperaturEsszimmer'],
|
||||
'type': 'temperature'},
|
||||
{'name': 'Treppenhaus Oben Temperatur',
|
||||
'address': imported_csv['TreppenhausObenTemperatur'],
|
||||
'state_address': imported_csv['TreppenhausObenTemperatur'],
|
||||
'type': 'temperature'},
|
||||
{'name': 'Eingangsbereich Temperatur',
|
||||
'address': imported_csv['TemperaturGang'],
|
||||
'state_address': imported_csv['TemperaturGang'],
|
||||
'type': 'temperature'},
|
||||
{'name': 'Wohnzimmer Gang Temperatur',
|
||||
'address': imported_csv['TemperaturWohnzimmerGangTuer'],
|
||||
'state_address': imported_csv['TemperaturWohnzimmerGangTuer'],
|
||||
'type': 'temperature'},
|
||||
{'name': 'Wohnzimmer Terassentür Temperatur',
|
||||
'address': imported_csv['TemperaturWohnzimmerAussenTuer'],
|
||||
'state_address': imported_csv['TemperaturWohnzimmerAussenTuer'],
|
||||
'type': 'temperature'},
|
||||
],
|
||||
'binary_sensor': [
|
||||
{'name': 'Gang Bewegungsmelder Schlafzimmer',
|
||||
'address': imported_csv['BewegungsmelderWest Motion Links'],
|
||||
'state_address': imported_csv['BewegungsmelderWest Motion Links'],
|
||||
'device_class': 'motion'},
|
||||
{'name': 'Gang Bewegungsmelder Wohnzimmer',
|
||||
'address': imported_csv['BewegungsmelderWest Motion Rechts'],
|
||||
'state_address': imported_csv['BewegungsmelderWest Motion Rechts'],
|
||||
'device_class': 'motion'},
|
||||
{'name': 'Gang Bewegungsmelder Mitte',
|
||||
'address': imported_csv['BewegungsmelderMitte Motion'],
|
||||
'state_address': imported_csv['BewegungsmelderMitte Motion'],
|
||||
'device_class': 'motion'},
|
||||
{'name': 'Gang Bewegungsmelder Ost',
|
||||
'address': imported_csv['BewegungsmelderOst Motion'],
|
||||
'state_address': imported_csv['BewegungsmelderOst Motion'],
|
||||
'device_class': 'motion'},
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue