rogierhofboer / com.ikea.tradfri.gateway

Athom Homey App for the IKEA Tradfri Gateway
MIT License
19 stars 21 forks source link

'Set relative dim-level' calculates wrong. #22

Closed Genghes closed 5 years ago

Genghes commented 5 years ago

If i have a dim level of 80% (0.8) and set relativ dim-level to -50% the dimlevel becomes 30%. This means it's just subtracting 50 from 80.. I would think -50% should meen 50% og the current level (80%-50%=40%).

If the dimlevel is 40% and the relative dim level is -50%, the dimlevel becomes 0 and the light turns off. It should dim to 50% of the current level.

slasktrat commented 5 years ago

Sorry, but the calculation is not wrong. Relative dim is built-in functionality in Homey and designed to work just like you say it does. Use case is e.g. if you have a button or rotating dimmer where you'd like to dim in steps, etc.

Genghes commented 5 years ago

OK, thanks for the quick answer.