UncleSamSwiss / ioBroker.loxone

ioBroker adapter for Loxone Miniserver
Apache License 2.0
27 stars 24 forks source link

Fix lumitech brightness and temperature #544

Closed Arcticon closed 1 month ago

Arcticon commented 1 month ago

Fixes UncleSamSwiss/ioBroker.loxone#150

raintonr commented 1 month ago

I don't see why one needs to try lumitechColorToBrightnessTemperature and then fall back to loxoneColorToBrightnessTemperature.

Surely either the control is Lumitech or it is not? Is there some error or other logic in the Loxone Miniserver that sometimes reports the wrong control type? The referenced issue doesn't seem to mention this.

IF it turns out that the Loxone Miniserver sometimes incorrectly reports the control type then personally I would have merged loxoneColorToBrightnessTemperature & lumitechColorToBrightnessTemperature into one function and have that try to match (lumitech|temp)\((\d+),(\d+)\).

Arcticon commented 1 month ago

you are correct. will change

Arcticon commented 1 month ago

the loxone UI always reported temp(x,y) instead of lumitech(x,y). i sadly dont know why 🫤

raintonr commented 1 month ago

the loxone UI always reported temp(x,y) instead of lumitech(x,y). i sadly dont know why 🫤

Yeah. Loxone are annoying sometimes :disappointed:

At least you have moved the 'or' logic from each call into lumitechOrLoxoneColorToBrightnessTemperature though so about the best we can do without Loxone actually doing what it says it will.