Plz help Solar generation triggers for pool filter no longer working

Hello,

I have been using triggers based on amount of solar generated to run my pool filter and it’s worked for the better part of the year. The past few weeks the turn off filter part in particular, has stopped working.
It should have monitor for solar generated if its above 2500 for 5 minutes, turn the filter on and if it drops below for 5 minutes then turn it off.

What have i done wrong?

alias: Solar Panel - Control Pool Pump
description: Based on solar generation, turn the pool pump on or off
trigger:
  - platform: numeric_state
    entity_id:
      - sensor.primo_8_2_1_1_power_ac
    for:
      hours: 0
      minutes: 5
      seconds: 0
    above: 2500
    id: Solar high
  - platform: numeric_state
    entity_id:
      - sensor.primo_8_2_1_1_power_ac
    for:
      hours: 0
      minutes: 5
      seconds: 0
    id: "Solar low "
    below: 2500
condition:
  - condition: time
    before: "18:30:00"
    after: "06:00:00"
    weekday:
      - sat
      - fri
      - thu
      - wed
      - tue
      - mon
      - sun
action:
  - if:
      - condition: trigger
        id:
          - Solar high
          - "Solar low "
    then:
      - type: turn_on
        device_id: 8554a818ce8999abaf4a5f1f42ec43ca
        entity_id: light.hue_color_light_2_3
        domain: light
      - service: notify.persistent_notification
        data:
          title: Alert - Solar Generation
          message: High Solar, Turning on Pool Pump
      - type: turn_on
        device_id: c0a28df2742abca3d17b20375d3e8480
        entity_id: switch.bat_plug_pool
        domain: switch
    else:
      - type: turn_off
        device_id: 8554a818ce8999abaf4a5f1f42ec43ca
        entity_id: light.hue_color_light_2_3
        domain: light
      - service: notify.persistent_notification
        data:
          message: Low Solar, Turning off Pool Pump
          title: Alert - Solar Generation
      - type: turn_off
        device_id: c0a28df2742abca3d17b20375d3e8480
        entity_id: switch.bat_plug_pool
        domain: switch
mode: single

Hi,

I have some questions:

  • Have you checked what the automation traces have to say & are there any clues there?
  • What does the history data for the entity sensor.primo_8_2_1_1_power_ac say around the times you might expect to see the value over or under the desired 2500?
  • For the automation action: section, to me, it seems to be reading like “if solar is high or solar is low” then do stuff. The else: might not come into play.

Maybe change the action to use a ‘choose’ with the trigger id.

Nick

The main issue is that the If/Then has been structured so that both the triggers will follow the “Then” branch… the Else branch will never be executed. “Solar low” needs to be removed from the “If”.

alias: Solar Panel - Control Pool Pump
description: Based on solar generation, turn the pool pump on or off
trigger:
  - platform: numeric_state
    entity_id:
      - sensor.primo_8_2_1_1_power_ac
    for: "00:05:00"
    above: 2500
    id: Solar high
  - platform: numeric_state
    entity_id:
      - sensor.primo_8_2_1_1_power_ac
    for: "00:05:00"
    id: Solar low
    below: 2500
condition:
  - condition: time
    before: "18:30:00"
    after: "06:00:00"
action:
  - if:
      - condition: trigger
        id:
          - Solar high
    then:
      - type: turn_on
        device_id: 8554a818ce8999abaf4a5f1f42ec43ca
        entity_id: light.hue_color_light_2_3
        domain: light
      - service: notify.persistent_notification
        data:
          title: Alert - Solar Generation
          message: High Solar, Turning on Pool Pump
      - type: turn_on
        device_id: c0a28df2742abca3d17b20375d3e8480
        entity_id: switch.bat_plug_pool
        domain: switch
    else:
      - type: turn_off
        device_id: 8554a818ce8999abaf4a5f1f42ec43ca
        entity_id: light.hue_color_light_2_3
        domain: light
      - service: notify.persistent_notification
        data:
          message: Low Solar, Turning off Pool Pump
          title: Alert - Solar Generation
      - type: turn_off
        device_id: c0a28df2742abca3d17b20375d3e8480
        entity_id: switch.bat_plug_pool
        domain: switch
mode: single