Growatt & KASA smart plug automation

Hi All,

I installed Home Assistant today and got everything working properly. I have 2x Growatt Inverters and and am trying to trigger some KASA smart switches only when a certain amount of solar power is generated, or turn them off when solar generation falls below a certain level.

Everything is working fine with the Growatt and KASA devices being detected, and I even have dashboards for them on my main dashboard and they are running fine.

I am able to get the Automation to run if I click on Run, however the scripts do not execute when the thresholds are met. I configured it via the GUI, but below is the code from some configs that I have tried:

'id: ‘1680933885439’
alias: New Automation
description: ‘’
trigger:

  • platform: numeric_state
    entity_id: sensor.growatt_total_output_power
    above: 10
    condition: []
    action:
  • type: turn_on
    device_id: 4291814630f8897e6e1468d30b3c17f5
    entity_id: switch.rig1
    domain: switch
    mode: single’

'id: ‘1680932575167’
alias: Solar > Rigs & Fans ON
description: ‘’
trigger:

  • type: power
    platform: device
    device_id: 3225d0b602ab449bf17d04cb34502869
    entity_id: sensor.xtd7a2608x_output_power
    domain: sensor
    above: 10
    condition: []
    action:
  • type: turn_on
    device_id: d8ebaef88eddecbe07dc1ebe4c3d4fc2
    entity_id: switch.rig3
    domain: switch
    mode: single’

@muppet3000 thought I’d tag you :slight_smile: