Logic of adjusting shutters to lightlevel [more complicated than it seems]

Ok, so there’s something wrong with my automation.
For some reason, every few minutes, the average light sensor triggers the action.

For example, I defined that if lux level goes above 1,000, the shutter is closed. So when it goes from 900 to 1,100 it is being closed as expected. However, it still triggers an action when it goes from 1,100 to 1,200, to 1,500 and so forth. Every time the shutter is being closed again and again.

Any solution for this?

This is how the trigger looks like:

ca

BTW, I used the same trigger template with my original light sensor (without the average) and I didn’t encounter this issue.

is the shutter already closed?

if so it just makes sure they reclose if theyve been manually opened.

you could either:

  • have a condition to check if theyre already closed.

  • have an input boolean that you triggers when you manually open them, this could then be a condition to prevent the blinds being reclosed

  • or you could use a template sensor to combine the average sensor, manual over-ride, already open etc into a single sensor, with possible values of closed, closing, opening, open, manual.
    then use the opening and closing states to trigger your blinds to open or close.

Thanks. Not all the above proposed solutions may work for me, but I kept wondering why this is not working as expected, and then it hit me - my light sensor has many attributes. How does the ‘average sensor’ know which attribute to use? How can I tell it which attribute to take?

By choosing the attribute in the attribute field.
Usually a light level sensor main state will be the light level, not an attribute though

1 Like

Ok, everything’s good now.