Closed cored0wn closed 3 years ago
I found the relevant code line: https://github.com/Scrounger/ioBroker.linkeddevices/blob/ad3f593cfd2c5a43ca8df3de69a8ef18876fd290/main.js#L1469
I'm not sure why you check if its the parent object value which will be changed. But if there's no reason for this you could easily remove this part from the condition and fix the issue.
But this value won't be accepted by bulb because of its decimal places.
Which Adapter sends the values to the bulb? At my point of view, this should be handled by the adapter it self. If the user input is not correct for exampl decimal places are wrong, the adapter should convert this value to a value that can handled by the devices. So please write an issue for the corresponding adapter.
I found the relevant code line:
I'm not sure why you check if its the parent object value which will be changed. But if there's no reason for this you could easily remove this part from the condition and fix the issue.
Reason is that the max decimal plaes only applies to the linked object. All settings are only for the linked objects. Parent objects will never be affected by the adapter - this is the concept.
Describe the bug
I created a linked device for my hue lights as described in your documentation. When I change the value of an hue light bulb in the hue adapter it works fine, but when I change the value of the brightness in your adapter to 45 for example the conversion (*100/255) produces 114.75. But this value won't be accepted by bulb because of its decimal places.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The adapter should remove the decimal places on both sides, as far as it is configured. Additionally an option "Convert according to function" would be useful.
Versions: