Who has a good automation for Covers / Shutters - Weather: Raining

Hi all.

i am searching for a good automation that my covers should close automatically (Weather by darksky component) when it is rain and open when its not raining anymore.

Can anyone share his config?

I am trying to use this one but i dont like it because everytime when the sensor is above 0.3 the shutter close 0.3 / 0.4 / 0.5 / …

alias: weather cover
  trigger:
  - above: '0.3'
    entity_id: sensor.dark_sky_precip_intensity
    platform: numeric_state
  condition:
  - after: 07:00
    before: '22:00'
    condition: time
  action:
  - data:
      entity_id: cover.xx
      position: '20'
    service: cover.set_cover_position

nobody can help me?

hello!

i think you can achieve this with a condition that triggers the automation only once every xxxx seconds so you avoid switch it back an forth.
so maybe every 30min. in your case?!

something like this:

    - condition: template
      value_template: "{{ ( as_timestamp(now()) - as_timestamp(state_attr('automation.aufklappen_1', 'last_triggered')) |int(0) ) > 43200 }}"

hope this is helpful for you

greez vienn