Closed Jan21493 closed 1 year ago
You're right. There's 2 possible solutions here:
I'll first build a test version for the first solution, since it's the easiest to implement and doesn't affect anything else. Would you be willing to test this version?
I've just released 0.6.1-beta.1
under the beta
tag. I think you'll have to install it manually.
Closing due to inactivity
Hi again, when I get brightness from a lamp via tradfri-monitor, I get something like
{...,"colorTemperature":95.6,"dimmer":0.4, ...}
but I have to send brightness as an integer value back to the lamp. This may restrict the range from 254 values (0..254) used by IKEA lights internally to only 100 values (0..100%) in tradfri-light-control node, see types.ts line 15 and tradfri-light-control.ts, line 15 as well.Without further correction, rounding of 0.4 (brightness/dimmer for IKEA lights internally when fully dimmed down after converting 1/254*100) would be 0 and then the lights are out. I propose to modify the code to allow a "float" instead of an integer. For colorTemperature, decimal points are allowed and don't throw an error during validation.