I’m trying to create an automation that will monitor for solar production between 1755 and 2101. If/when production drops below 3kW then go off grid.
I have an automation that goes off grid at 1758 if production is below 3kW, but it doesn’t roll. I’d like the new automation to allow for the grid connection to stay active while production is above 3kW.
This is my current attempt, but it doesn’t work and I’m not sure why. any pointers would be greatly appreciated.
alias: Rolling Off Grid below 3000W production Weekdays
description: Go off grid after between 1755 and 2101 if solar production is under 3000W.
triggers:
- trigger: numeric_state
entity_id: sensor.home_gateway_solar_power
below: 3000
for:
hours: 0
minutes: 5
seconds: 0
conditions:
- condition: time
after: "17:55:00"
before: "21:01:00"
weekday:
- mon
- tue
- wed
- thu
- fri
- condition: device
type: is_off
device_id: 1a9ca0580383ea6516516b29b6d3c72a
entity_id: 0084bdf48e3ec9322cbd9525ff53b291
domain: switch
actions:
- type: turn_on
device_id: 1a9ca0580383ea6516516b29b6d3c72a
entity_id: 0084bdf48e3ec9322cbd9525ff53b291
domain: switch
- action: notify.mobile_app_turtle_s_max
metadata: {}
data:
message: Solar production below 3kW, going off grid!
mode: single
For reference, this is my automation that checks at 1758 and goes off is below 3kW.
alias: Off grid below 3000kW weekdays
description: Go off grid after 1758 if solar production is under 3000kW.
triggers:
- at: "17:58:00"
trigger: time
conditions:
- type: is_power
condition: device
device_id: 1a9ca0580383ea6516516b29b6d3c72a
entity_id: 454f0f232d8916201880c7fd107ed9b9
domain: sensor
below: 3000
- condition: time
weekday:
- mon
- tue
- wed
- thu
- fri
- condition: device
type: is_off
device_id: 1a9ca0580383ea6516516b29b6d3c72a
entity_id: 0084bdf48e3ec9322cbd9525ff53b291
domain: switch
actions:
- type: turn_on
device_id: 1a9ca0580383ea6516516b29b6d3c72a
entity_id: 0084bdf48e3ec9322cbd9525ff53b291
domain: switch
- metadata: {}
data:
message: Solar production below 3kW, going off grid!
action: notify.mobile_app_turtle_s_max
mode: single
Ultimately the reason for the switch is summer is coming and I would like to be able to send surplus solar to the grid in the early evening while I still have solid production. No need to go off grid and “lose” the generation for a few hours just because I don’t want to consume anything during peak energy cost.