Skip to content

Commit

Permalink
Added check for current tariff in consider charging notification.
Browse files Browse the repository at this point in the history
Only applies to Agile tariff if the battery runtime won't make it past peak electricity period.

Update #102
  • Loading branch information
dannytsang committed Nov 1, 2024
1 parent 31ac7fd commit be1b072
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions packages/integrations/energy/energy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -233,13 +233,19 @@ automation:
- trigger: time
at: "15:00:00"
conditions:
- condition: template
- alias: Battery runtime less than 19:00 (usually end of peak time)
condition: template
value_template: >-
{{ today_at("19:00") > as_datetime(states('sensor.battery_charge_remaining_hours')) }}
- not:
- alias: Not already charging battery
not:
- condition: state
entity_id: sensor.growatt_sph_inverter_mode
state: "Battery first"
- alias: Check tariff is on Agile
condition: template
value_template: >-
{{ 'AGILE' in state_attr('event.octopus_energy_electricity_current_day_rates', 'tariff_code')|upper }}
actions:
- action: script.send_direct_notification
data:
Expand Down

0 comments on commit be1b072

Please sign in to comment.