Move sunscreen down based on Inverter power state

Hi There,

I made an automation based on one of my micro-inverter power productin entity. I want the sunscreen automatically go down when the inverter has a power production value above e.g. 40 watts for 1 minute. I also have some other criteria like:

  • wind sensor trigger is “OFF”
  • rain sensor trigger is “OFF”

I have the following code, but the automatin will not trigger What am I doing wrong?

alias: Zonwering uitklappen bij zon
description: "Zonwering uitklappen bij zon "
trigger:
  - platform: numeric_state
    entity_id:
      - sensor.inverter_482304107952
    for:
      hours: 0
      minutes: 0
      seconds: 10
    above: "40"
condition:
  - condition: device
    type: is_on
    device_id: 59f5aa3ddc2b1a7b96b72356ca8f178f
    entity_id: bf9e3e5ec59d80b80fe5755fbe431c05
    domain: switch
  - condition: state
    entity_id: switch.shellyplus1_cc7b5c0ea4c4_switch_0
    state: "off"
  - condition: state
    entity_id: switch.melding_het_regent
    state: "on"
    for:
      hours: 1
      minutes: 0
      seconds: 0
action:
  - type: turn_on
    device_id: bc0ef7987514212fcab059d15b59ce38
    entity_id: f3d934a6dea4b36ee024b1ee8847f6d7
    domain: switch
mode: single