Sure no problem. I presume that you are interested in the new graphs and the used sensors.
I have three solar installations (14 panels, 7 panels and 3 panels). I created separate sensors for those installations and am using forecast.solar for retrieving the forecast for those installations.
Sensor definition:
template:
- sensor:
- name: "Current total solar power production"
unique_id: current_total_solar_power_production
unit_of_measurement: "W"
state: "{{ ((states('sensor.pv_14_meter_electric_consumption_w') | int) + (states('sensor.pv_7_meter_electric_consumption_w') | int) + (states('sensor.pv_3_meter_electric_consumption_w') | int)) | abs }}"
icon: mdi:solar-power
- sensor:
- name: "Current solar power production PV 3"
unique_id: current_solar_power_production_pv_3
unit_of_measurement: "W"
state: "{{ ((states('sensor.pv_3_meter_electric_consumption_w') | int)) | abs }}"
icon: mdi:solar-power
- sensor:
- name: "Current solar power production PV 7"
unique_id: current_solar_power_production_pv_7
unit_of_measurement: "W"
state: "{{ ((states('sensor.pv_7_meter_electric_consumption_w') | int)) | abs }}"
icon: mdi:solar-power
- sensor:
- name: "Current solar power production PV 14"
unique_id: current_solar_power_production_pv_14
unit_of_measurement: "W"
state: "{{ ((states('sensor.pv_14_meter_electric_consumption_w') | int)) | abs }}"
icon: mdi:solar-power
- sensor:
- name: "Forecast total solar power production"
unique_id: forecast_total_solar_power_production
unit_of_measurement: "Wh"
state: "OK"
attributes:
watt_hours_14p: "{{ state_attr('sensor.solar_forecast_hours_14p','watt_hours') }}"
watt_hours_7p: "{{ state_attr('sensor.solar_forecast_hours_7p','watt_hours') }}"
watt_hours_3p: "{{ state_attr('sensor.solar_forecast_hours_3p','watt_hours') }}"
icon: mdi:solar-power
rest:
- scan_interval: 3610
resource: https://api.forecast.solar/estimate/52.167400/6.734021/40/45/4.34
method: GET
sensor:
- name: "Solar Forecast Watt 14p"
json_attributes_path: "$.result"
json_attributes:
- watts
value_template: 'OK'
- name: "Solar Forecast Hours 14p"
json_attributes_path: "$.result"
json_attributes:
- watt_hours
value_template: 'OK'
- name: "Solar Forecast Hours Day 14p"
json_attributes_path: "$.result"
json_attributes:
- watt_hours_day
value_template: 'OK'
- scan_interval: 3620
resource: https://api.forecast.solar/estimate/52.167400/6.734021/40/45/2.555
method: GET
sensor:
- name: "Solar Forecast Watt 7p"
json_attributes_path: "$.result"
json_attributes:
- watts
value_template: 'OK'
- name: "Solar Forecast Hours 7p"
json_attributes_path: "$.result"
json_attributes:
- watt_hours
value_template: 'OK'
- name: "Solar Forecast Hours Day 7p"
json_attributes_path: "$.result"
json_attributes:
- watt_hours_day
value_template: 'OK'
- scan_interval: 3630
resource: https://api.forecast.solar/estimate/52.167400/6.734021/25/-45/1.08
method: GET
sensor:
- name: "Solar Forecast Watt 3p"
json_attributes_path: "$.result"
json_attributes:
- watts
value_template: 'OK'
- name: "Solar Forecast Hours 3p"
json_attributes_path: "$.result"
json_attributes:
- watt_hours
value_template: 'OK'
- name: "Solar Forecast Hours Day 3p"
json_attributes_path: "$.result"
json_attributes:
- watt_hours_day
value_template: 'OK'
Graph: Current solar power production
This graph uses the custom apexcharts card. This card can be installed via HACS.
type: custom:apexcharts-card
apex_config:
chart:
type: area
height: 350px
legend:
show: false
fill:
type:
- gradient
- gradient
- gradient
- gradient
gradient:
shadeIntensity: 1
inverseColors: false
opacityFrom: 0.45
opacityTo: 0.05
stops:
- 20
- 100
- 100
- 100
stroke:
show: true
curve: smooth
yaxis:
min: 0
max: 7400
forceNiceScale: false
responsive:
- breakpoint: 769
options:
chart:
height: 350px
- breakpoint: 1025
options:
chart:
height: 250px
- breakpoint: 10000
options:
chart:
height: 350px
graph_span: 17h
span:
start: day
offset: +5h
header:
show: true
title: Current solar power production
standard_format: true
show_states: true
colorize_states: true
now:
show: true
all_series_config:
unit: W
series:
- entity: sensor.current_total_solar_power_production
type: area
stroke_width: 2
extend_to_end: false
show:
legend_value: false
- entity: sensor.current_solar_power_production_pv_14
name: PV 14
type: area
stroke_width: 2
extend_to_end: false
show:
legend_value: false
- entity: sensor.current_solar_power_production_pv_7
name: PV 7
type: area
stroke_width: 2
extend_to_end: false
show:
legend_value: false
- entity: sensor.current_solar_power_production_pv_3
name: PV 3
type: area
stroke_width: 2
extend_to_end: false
show:
legend_value: false
Graph: Forecast total solar power production
This graph uses the custom apexcharts card. This card can be installed via HACS.
type: custom:apexcharts-card
apex_config:
chart:
type: area
height: 350px
legend:
show: false
fill:
type:
- gradient
- gradient
- gradient
- gradient
gradient:
shadeIntensity: 1
inverseColors: false
opacityFrom: 0.45
opacityTo: 0.05
stops:
- 20
- 100
- 100
- 100
stroke:
show: true
curve: smooth
yaxis:
min: 0
max: 50
forceNiceScale: false
responsive:
- breakpoint: 769
options:
chart:
height: 350px
- breakpoint: 1025
options:
chart:
height: 250px
- breakpoint: 10000
options:
chart:
height: 350px
graph_span: 17h
span:
start: day
offset: +5h
header:
show: true
title: Forecast total solar power production
standard_format: true
show_states: true
colorize_states: true
now:
show: true
all_series_config:
unit: kWh
series:
- entity: sensor.forecast_total_solar_power_production
name: Forecast total solar power production
type: area
stroke_width: 2
extend_to_end: false
show:
legend_value: false
data_generator: >
let res = []; let today = new Date().getDay(); for (const [key, value] of
Object.entries(entity.attributes.watt_hours_14p)) {
let itemDate = new Date(key.replace(/-/g, '\/').replace(/T.+/, ''));
if (itemDate.getDay() == today) {
res.push([itemDate.getTime(), (value + entity.attributes.watt_hours_7p[key] + entity.attributes.watt_hours_3p[key]) / 1000]);
}
} return res;
- entity: sensor.solar_forecast_hours_14p
name: PV 14
type: area
stroke_width: 2
extend_to_end: false
show:
legend_value: false
data_generator: |
let res = [];
let today = new Date().getDay();
for (const [key, value] of Object.entries(entity.attributes.watt_hours)) {
let itemDate = new Date(key.replace(/-/g, '\/').replace(/T.+/, ''));
if (itemDate.getDay() == today) {
res.push([itemDate.getTime(), value / 1000]);
}
}
return res;
- entity: sensor.solar_forecast_hours_7p
name: PV 7
type: area
stroke_width: 2
extend_to_end: false
show:
legend_value: false
data_generator: |
let res = [];
let today = new Date().getDay();
for (const [key, value] of Object.entries(entity.attributes.watt_hours)) {
let itemDate = new Date(key.replace(/-/g, '\/').replace(/T.+/, ''));
if (itemDate.getDay() == today) {
res.push([itemDate.getTime(), value / 1000]);
}
}
return res;
- entity: sensor.solar_forecast_hours_3p
name: PV 3
type: area
stroke_width: 2
extend_to_end: false
show:
legend_value: false
data_generator: |
let res = [];
let today = new Date().getDay();
for (const [key, value] of Object.entries(entity.attributes.watt_hours)) {
let itemDate = new Date(key.replace(/-/g, '\/').replace(/T.+/, ''));
if (itemDate.getDay() == today) {
res.push([itemDate.getTime(), value / 1000]);
}
}
return res;