Skip to content

Commit

Permalink
Add more utility meter tariffs and fix for solar_autarkie_ratio
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanm101 committed Apr 6, 2023
1 parent 1b6a934 commit 494ed03
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 54 deletions.
101 changes: 48 additions & 53 deletions packages/electricity_tarriff_automations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,138 +41,133 @@ automation:
entity_id: select.household_grid_to_battery_yearly
data:
option: '{{ tariff }}'
- service: select.select_option
target:
entity_id: select.household_imported_power_daily
data:
- data:
option: '{{ tariff }}'
- service: select.select_option
service: select.select_option
target:
entity_id: select.household_imported_power_monthly
data:
entity_id: select.solar_imported_power_daily_solaredge
- data:
option: '{{ tariff }}'
- service: select.select_option
service: select.select_option
target:
entity_id: select.household_imported_power_yearly
data:
option: '{{ tariff }}'
entity_id: select.solar_imported_power_daily
- data:
option: "{{ tariff }}"
option: '{{ tariff }}'
service: select.select_option
target:
entity_id: select.solar_imported_power_daily_solaredge
entity_id: select.solar_battery_from_grid_daily
- data:
option: "{{ tariff }}"
option: '{{ tariff }}'
service: select.select_option
target:
entity_id: select.solar_imported_power_daily
entity_id: select.solar_battery_to_grid_daily
- data:
option: "{{ tariff }}"
option: '{{ tariff }}'
service: select.select_option
target:
entity_id: select.solar_battery_from_grid_daily
entity_id: select.solar_battery_out_daily
- data:
option: "{{ tariff }}"
option: '{{ tariff }}'
service: select.select_option
target:
entity_id: select.solar_house_consumption_daily
- data:
option: "{{ tariff }}"
option: '{{ tariff }}'
service: select.select_option
target:
entity_id: select.solar_imported_power_weekly_solaredge
- data:
option: "{{ tariff }}"
option: '{{ tariff }}'
service: select.select_option
target:
entity_id: select.solar_imported_power_weekly
- data:
option: "{{ tariff }}"
option: '{{ tariff }}'
service: select.select_option
target:
entity_id: select.solar_battery_from_grid_weekly
- data:
option: "{{ tariff }}"
option: '{{ tariff }}'
service: select.select_option
target:
entity_id: select.solar_battery_to_grid_weekly
- data:
option: '{{ tariff }}'
service: select.select_option
target:
entity_id: select.solar_battery_out_weekly
- data:
option: '{{ tariff }}'
service: select.select_option
target:
entity_id: select.solar_house_consumption_weekly
- data:
option: "{{ tariff }}"
option: '{{ tariff }}'
service: select.select_option
target:
entity_id: select.solar_imported_power_monthly_solaredge
- data:
option: "{{ tariff }}"
option: '{{ tariff }}'
service: select.select_option
target:
entity_id: select.solar_imported_power_monthly
- data:
option: "{{ tariff }}"
option: '{{ tariff }}'
service: select.select_option
target:
entity_id: select.solar_battery_from_grid_monthly
- data:
option: "{{ tariff }}"
option: '{{ tariff }}'
service: select.select_option
target:
entity_id: select.solar_battery_to_grid_monthly
- data:
option: '{{ tariff }}'
service: select.select_option
target:
entity_id: select.solar_battery_in_monthly
- data:
option: "{{ tariff }}"
option: '{{ tariff }}'
service: select.select_option
target:
entity_id: select.solar_battery_out_monthly
- data:
option: "{{ tariff }}"
option: '{{ tariff }}'
service: select.select_option
target:
entity_id: select.solar_house_consumption_monthly
- data:
option: "{{ tariff }}"
option: '{{ tariff }}'
service: select.select_option
target:
entity_id: select.solar_imported_power_yearly_solaredge
- data:
option: "{{ tariff }}"
option: '{{ tariff }}'
service: select.select_option
target:
entity_id: select.solar_imported_power_yearly
- data:
option: "{{ tariff }}"
option: '{{ tariff }}'
service: select.select_option
target:
entity_id: select.solar_battery_from_grid_yearly
- data:
option: "{{ tariff }}"
service: select.select_option
target:
entity_id: select.solar_battery_in_yearly
- data:
option: "{{ tariff }}"
service: select.select_option
target:
entity_id: select.solar_battery_out_yearly
- data:
option: "{{ tariff }}"
service: select.select_option
target:
entity_id: select.solar_house_consumption_yearly
- data:
option: "{{ tariff }}"
option: '{{ tariff }}'
service: select.select_option
target:
entity_id: select.solar_battery_to_grid_yearly
- data:
option: "{{ tariff }}"
option: '{{ tariff }}'
service: select.select_option
target:
entity_id: select.solar_battery_to_grid_monthly
entity_id: select.solar_battery_in_yearly
- data:
option: "{{ tariff }}"
option: '{{ tariff }}'
service: select.select_option
target:
entity_id: select.solar_battery_to_grid_weekly
entity_id: select.solar_battery_out_yearly
- data:
option: "{{ tariff }}"
option: '{{ tariff }}'
service: select.select_option
target:
entity_id: select.solar_battery_to_grid_daily
entity_id: select.solar_house_consumption_yearly
2 changes: 1 addition & 1 deletion packages/energy_stats.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ template:
{% if (house_consumption_daily <= 0) %}
0
{% else %}
{{ (1 - (imported_power_daily / house_consumption_daily) * 100) | round (1) }}
{{ ((1 - (imported_power_daily / house_consumption_daily)) * 100) | round (1) }}
{% endif %}
- name: "Solar Inverter Effectiveness"
Expand Down
6 changes: 6 additions & 0 deletions packages/energy_utilities.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ utility_meter:
source: sensor.solar_battery_out_kwh
name: Solar Battery Out Daily
cycle: daily
tariffs:
- peak
- offpeak

# Electricity Export
solar_exported_power_daily:
Expand Down Expand Up @@ -124,6 +127,9 @@ utility_meter:
source: sensor.solar_battery_out_kwh
name: Solar Battery Out Weekly
cycle: weekly
tariffs:
- peak
- offpeak

# Electricity Export
solar_exported_power_weekly:
Expand Down

0 comments on commit 494ed03

Please sign in to comment.