if type(options[TYPE_SELECT]) == dict:
self._options = options[TYPE_SELECT]
else:
# Read from _instance.EPC FUNCTIONS definition
# Swap key, value of _instance.EPC_FUNCTIONS[opc][1]
self._options = {
v: k for k, v in connector._instance.EPC_FUNCTIONS[code][1].items()
}
I'm working on including a property value in the EPC_FUNCTIONS constant.
It is possible to simplify the ENL_OP_CODES definition by referencing EPC_FUNCTIONS on the echonetlite integration side.
for example. . .
pychonet/ElectricBlind.py
echonetlite/const.py
echonetlite/select.py