Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 108783

Automation working fine, if triggers are not to long time apart

$
0
0

My goal is to turn on my waterheater, when my solarpanels are producing more that 1000W.
I did my automation i visual editor, and it works fine, if power from the panels drops below 1000W a few times a day. But if the sun is shining all day, the heater stays on after sunset.
The idea behind my automation is to turn on the heater if power is above 1000W - then wait 15 mins - turn off if power is below 1000W, or else turn on.
My issue is days when clouds lowers the power a few times during the day, the heater turn off after 15 mins, as it should. If power comes over 1000W it turns on again. Days with sun all day, the heater turns on, but does not turn off at the end of the day (when power comes below 1000W)
The code in YAML:

alias: Tænd vandvarmer
description: ""
trigger:
  - platform: numeric_state
    entity_id:
      - sensor.saj_current_power
    above: 1000
condition: []
action:
  - type: turn_on
    device_id: 483ceb8b126b3d8c111d7d51b61be757
    entity_id: 58a4370cedaa6188ce5c989c47ba3edc
    domain: switch
  - delay:
      hours: 0
      minutes: 15
      seconds: 0
      milliseconds: 0
    enabled: true
  - if:
      - condition: numeric_state
        entity_id: sensor.saj_current_power
        below: 999.9
    then:
      - type: turn_off
        device_id: 483ceb8b126b3d8c111d7d51b61be757
        entity_id: 58a4370cedaa6188ce5c989c47ba3edc
        domain: switch
    else:
      - type: turn_on
        device_id: 483ceb8b126b3d8c111d7d51b61be757
        entity_id: 58a4370cedaa6188ce5c989c47ba3edc
        domain: switch
mode: single

Forgive my spelling, as i`m Danish and newbee :slight_smile:

4 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 108783

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>