alengwenus / pypck

Asynchronous LCN-PCK library written in Python
MIT License
8 stars 4 forks source link

Separate internal enumeration of VarUnits from string that is shown to the user #75

Open maximilianriemensberger opened 3 years ago

maximilianriemensberger commented 3 years ago

https://github.com/alengwenus/pypck/blob/0d50c890c97cb3ce427521a16ec0943c800f0d60/pypck/lcn_defs.py#L671

This line defines the VarUnit.LUX_I as Lux_I which is eventually shown to the user for example by homeassitant. However, the proper unit to show would be lx. Same problem for Lux_T. VarUnit should provide a function that converts the enumeration string to the desired unit that is displayed.