Create LUA scene for Fibaro Home Center 2

Job ID: 34351353

Budget: $10 – $30 USD

I have a bathroom light which I want to be full on during the day if I turn on the Fibaro Dimmer 2 which controls it. But at night time I want it to automatically go to a dimmed state. They should not turn on when the LUA scene sets a dimmed or full state.

I think this might best be done by setting Parameter 19 on the Fibaro dimmer 2 I use.

When the time is more than 22:00 and less than 8:00, parameter 19 should be set to 1. Else it should be 99.

I only need the LUA code, I can change the device ids and enter it into a scene myself.

Thanks
Related categories: C Programming Home Automation Lua