Hi all,
I’m trying to create a rule that enables a heater once I have an overproduction of 1KW and a forecast of sun (using Forecast.Solar plugin) for the next hour.
For this I have created the following rule (currently just to send me a message in case of over production to see if it is working):
alias: PV overproduction - start
description: start switch when I have solar over-production
trigger:
- platform: event
event_type: state_changed
event_data:
entity_id: binary_sensor.exporting_power
condition:
- condition: and
conditions:
- alias: over-production > 1000 W
condition: numeric_state
entity_id: sensor.export_power
value_template: "{{ -(state.state | float) }}"
above: "1000"
- alias: heat boiler is OFF
condition: numeric_state
entity_id: sensor.heat_boiler_state
below: "0.5"
enabled: false
- condition: template
value_template: >-
{{ (states('sensor.energy_next_hour') | int -
states('sensor.sensor.total_dc_power') | int) > 1000}}
action:
- alias: wait to confirm that over-production is really here
delay:
hours: 0
minutes: 2
seconds: 0
milliseconds: 0
- alias: heat boiler becomes ON
service: rest_command.com_bouton
data:
item: 1
enabled: false
- device_id:
domain: mobile_app
type: notify
message: Überproduktion in der nächsten Stunde erwartet
title: ÜBERPRODUKTION
- alias: small wait to not restart immediatly
delay:
hours: 0
minutes: 0
seconds: 30
milliseconds: 0
mode: single
Unfortunately the rule never seems to be triggered.
Does anybody any experiences with such automations? Is it a good idea to work here with Forecast.Solar plug or are there any better ideas?
Thanks in advance for your support!