Welcome to Smart Home Forum by FIBARO
Search the Community
Showing results for tags 'switch-case'.
Hi, I have a LUA programming question - for making a scene that helps HC2 heat panel control my AC via ZXT-120. My end-goal (for now) is to set the Fan speed and AC mode (heat/cool/off) by the logic in the following table (explanation below) Explanation for table: Setpoint is retrieved from Heat Panel. The deviation from setpoint is calculated from a global temp-variable subtracting setpoint to get the deviation. Based on that daviation AND the outside temperature, the AC will be set do fan speed and mode. I realize that the amount of if statements would be too big for me to handle, so someone suggested to use "switch-case" (which i am not familiar with but is sort of understood). The below example was provided for me: The problem is i still can't translate this to anything sensible in LUA. Can anyone please help me?