Automate roller shutter problem

I try to automatic take down my roller shutter. with the following code:

             position: '{{ states.cover.markise_platting_level_23_0.attributes.current_position + 10 }}'

The problem is that it only run once. So it gets out 10%. If i restart hass, it goes out 10% more. The sensor.aeotec_zw100_multisensor_6_luminance_24_3 is updating. Anyone sees what i do wrong ? The whole code is blow.


- alias: 'Automarkise'
     platform: numeric_state
     entity_id: sensor.aeotec_zw100_multisensor_6_luminance_24_3
     above: 1000
     condition: and
       - condition: state
         entity_id: input_boolean.automarkise
         state: 'on'
       - condition: state
         entity_id: input_boolean.borte
         state: 'off'
     - service: cover.set_cover_position
       entity_id: cover.markise_platting_level_23_0
         position: '{{ states.cover.markise_platting_level_23_0.attributes.current_position + 10 }}'

If I understand correctly what you want to happen is for as long as the light level is above 1000 keep closing the cover by 10 until it is below 1000?

Edit: Just saw that it is running only once. You need either 1. a different trigger or 2. a loop to continue to close the shutter until the level is below 1000.

ok. Thank you for answering. i thought the rule run every time sensor.aeotec_zw100_multisensor_6_luminance_24_3 changed

If you wanted to do that, remove the “above 1000” condition on the trigger and make it a condition.

So everytime the sensor changes the condition would check to make sure it is above 1000 and then fire the action.

Thank you. Makes sense when i think about it :slight_smile: