I belive this could be simplified a lot (at least on the outside) if implemented as a plugin. The only problem is my lack of programming experience.
Is there anyone that would take on the task? Or point me in the right direction? Maybe there are som similar plugins out there that basically does the same thing?
The logic is more or less like this.
- Code: Select all
If motion and day set light to 100% and set variable AutoOn to True.
If motion and night set light to 20% and set variable AutoOn to Ture.
If motion off and variable AutoOn is true then restart timer.
If motion on and variable AutoOn is true then stop timer.
If timer expires then turn off light.
This is quite simple but has taken some time to work out. The concept that the timer only starts on motion off prevents the light to turn off if there is a lot of movement in front of the motion sensor.
If anyone has any tips just fire away