mein Fronius Wechselrichter gibt über Modbus den Ladungsstatus des Speichers als Zahlen von 1 bis 7 aus. Diese Werte haben die Bedeutung
1: OFF
2: EMPTY
3: DISCHAGING
4: CHARGING
5: FULL
6: HOLDING
7: TESTING
wie kann ich im ModbusAttr die Stati als Reading bekommen? Versucht habe ich
attr gen24 obj-h40354-expr my @stati=(OFF, EMPTY, DISCHAGING, CHARGING, FULL, HOLDING, TESTING);; $stati[$val]
Das hat aber zu der Fehlermeldung "Invalid Expression my @stati=(OFF, EMPTY, DISCHAGING, CHARGING, FULL, HOLDING, TESTING); $stati[$val]" geführt
Siehe commandref (https://fhem.de/commandref_modular.html#ModbusAttr):
Zitatobj-[cdih][1-9][0-9]*-map
defines a map to convert values read from the device to more convenient values when the raw value is read from the device or back when the value to write has to be converted from the user value to a raw value that can be written. Example: 0:mittig, 1:oberhalb, 2:unterhalb
Vielen Dank. Das hab ich in der Commandref übersehen. :o