No worries:
type: custom:apexcharts-card
apex_config:
chart:
height: auto
header:
show: true
title: EMHASS Daily Forecast
show_states: true
colorize_states: true
graph_span: 36h
span:
start: minute
offset: +0h
all_series_config:
stroke_width: 1
now:
show: true
label: Now
yaxis:
- min: -7
max: 13
decimals: 0
apex_config:
forceNiceScale: true
tick_amount: 4
series:
- entity: sensor.consumption_savings_dmo
float_precision: 0
color: black
name: Savings (vs DMO)
show:
legend_value: false
in_chart: false
- entity: sensor.total_cost_fun_value
unit: $
invert: true
float_precision: 0
name: Cost
show:
legend_value: false
in_chart: false
transform: return x *-1
- entity: sensor.consumption_forecast
unit: kWh
float_precision: 0
name: House
show:
legend_value: false
in_chart: false
- entity: sensor.pv_forecast_energy
unit: kWh
float_precision: 0
color: orange
name: Solar
show:
legend_value: false
in_chart: false
- entity: sensor.p_pv_forecast
type: line
stroke_width: 2
color: orange
extend_to: false
show:
in_header: false
legend_value: false
data_generator: |
return entity.attributes.forecasts.map((entry) => {
return [new Date(entry.date), entry.p_pv_forecast/1000];
});
- entity: sensor.p_load_forecast
type: line
color: purple
extend_to: false
show:
in_header: false
legend_value: false
stroke_width: 1
data_generator: |
return entity.attributes.forecasts.map((entry) => {
return [new Date(entry.date), entry.p_load_forecast/1000];
});
- entity: sensor.p_batt_forecast
curve: stepline
color: lightgreen
extend_to: false
show:
in_header: false
legend_value: false
stroke_width: 1
type: area
data_generator: |
return entity.attributes.battery_scheduled_power.map((entry) => {
return [new Date(entry.date), entry.p_batt_forecast/1000];
});
- entity: sensor.p_grid_forecast
curve: stepline
color: lightgray
type: area
extend_to: false
show:
in_header: false
legend_value: false
stroke_width: 1
data_generator: |
return entity.attributes.forecasts.map((entry) => {
return [new Date(entry.date), entry.p_grid_forecast/1000];
});
- entity: sensor.p_deferrable0
curve: stepline
color: blue
name: Pool Pump
extend_to: false
show:
in_header: false
legend_value: false
stroke_width: 1
data_generator: |
return entity.attributes.deferrables_schedule.map((entry) => {
return [new Date(entry.date), entry.p_deferrable0/1000];
});
- entity: sensor.p_deferrable1
curve: stepline
color: red
name: Pool Heater
extend_to: false
show:
in_header: false
legend_value: false
stroke_width: 1
data_generator: |
return entity.attributes.deferrables_schedule.map((entry) => {
return [new Date(entry.date), entry.p_deferrable1/1000];
});
- entity: sensor.p_deferrable3
curve: stepline
name: HVAC
color: blue
extend_to: false
show:
in_header: false
legend_value: false
stroke_width: 1
data_generator: |
return entity.attributes.deferrables_schedule.map((entry) => {
return [new Date(entry.date), entry.p_deferrable3/1000];
});
- entity: sensor.p_deferrable4
curve: stepline
color: red
name: Hot Water
extend_to: false
show:
in_header: false
legend_value: false
stroke_width: 1
data_generator: |
return entity.attributes.deferrables_schedule.map((entry) => {
return [new Date(entry.date), entry.p_deferrable4/1000];
});
- entity: sensor.p_deferrable2
curve: stepline
color: black
name: Car
extend_to: false
show:
in_header: false
legend_value: false
stroke_width: 1
data_generator: |
return entity.attributes.deferrables_schedule.map((entry) => {
return [new Date(entry.date), entry.p_deferrable2/1000];
});
- entity: sensor.p_deferrable5
curve: stepline
name: Car2
color: grey
extend_to: false
show:
in_header: false
legend_value: false
stroke_width: 1
data_generator: |
return entity.attributes.deferrables_schedule.map((entry) => {
return [new Date(entry.date), entry.p_deferrable5/1000];
});
view_layout:
position: main
type: custom:apexcharts-card
experimental:
color_threshold: true
graph_span: 36h
span:
start: minute
offset: '-0h'
header:
show: true
title: Battery, Price & Cost Forecast
show_states: true
colorize_states: true
now:
show: true
label: Now
series:
- entity: sensor.unit_load_cost
float_precision: 2
yaxis_id: first
curve: stepline
extend_to: false
show:
in_header: before_now
legend_value: false
stroke_width: 1
color: red
unit: $/kWh
color_threshold:
- value: 0
color: cyan
- value: 0.19
color: green
- value: 0.3
color: yellow
- value: 0.4
color: red
data_generator: |
return entity.attributes.unit_load_cost_forecasts.map((entry) => {
return [new Date(entry.date), entry.unit_load_cost];
});
- entity: sensor.unit_prod_price
float_precision: 2
yaxis_id: first
curve: stepline
unit: $/kWh
extend_to: false
show:
in_header: before_now
legend_value: false
color: cyan
stroke_width: 1
data_generator: |
return entity.attributes.unit_prod_price_forecasts.map((entry) => {
return [new Date(entry.date), entry.unit_prod_price];
});
- entity: sensor.amber_feed_in_forecast
float_precision: 2
yaxis_id: first
curve: stepline
extend_to: false
show:
in_header: after_now
legend_value: false
color: orange
stroke_width: 1
name: feed in forecast
data_generator: |
return entity.attributes.forecasts.map((entry) => {
return [new Date(entry.start_time), entry.per_kwh];
});
- entity: sensor.soc_batt_forecast
float_precision: 0
yaxis_id: second
time_delta: +30m
extend_to: false
show:
in_header: before_now
legend_value: false
color: green
stroke_width: 1
name: battery SOC
data_generator: |
return entity.attributes.battery_scheduled_soc.map((entry) => {
return [new Date(entry.date), entry.soc_batt_forecast]; });
- entity: sensor.filtered_powerwall_soc
yaxis_id: second
type: line
stroke_width: 1
extend_to: false
color: green
show:
in_header: false
legend_value: false
in_chart: true
- entity: input_number.amber_closing_import_price
curve: stepline
yaxis_id: first
extend_to: false
stroke_width: 1
color: red
show:
in_header: false
legend_value: false
in_chart: true
- entity: input_number.amber_closing_export_price
curve: stepline
yaxis_id: first
extend_to: false
stroke_width: 1
color: blue
show:
in_header: false
legend_value: false
yaxis:
- id: first
decimals: 1
max: 1
min: 0
apex_config:
tickAmount: 2
logarithmic: false
- id: second
show: false
opposite: false
decimals: 1
max: 100
min: 0
apex_config:
tickAmount: 2
view_layout:
position: main