Sure, no problem.
Card-Preview
The Card uses the following components:
- Tabbed-Card (HACS)
- Apex-Charts-Card (HACS)
- Stack-in-a-Card (HACS)
- Uptime-Card (HACS)
- Mushroom-Card HACS)
- Multiscrape-Integration (HACS)
- Markdown-Card
YAML-Code for the Card and Sensors
- YAML-Code for the Card
- YAML-Code for the Weekly Forecast Card
- Sensors for price preview and price level
- Multiscrape-Sensors for price forecast
For this you need:
- Utility-Meters for Daily, Weekly, Monthly and Yearly Consumption and Costs (based on the Sensors from the Tibber-Integration)
- A Template Sensor that shows the price-range from min to max on that day (see below)
- A template Sensor that shows how close the current price is the max-today price in percent (see below)
- 4 template sensors for the daily, weekly, monthly and yearly cost per kwh (see below)
- a switch-entity from your home-battery to turn on/off charging (to charge energy when it is cheap)
- a sensors that knows if it is before 13:00 (1pm) to show a message, that the prices for tomorrow will come after 1pm (see below)
- input-boolean that shows if your home battery should charge or not
- an automation to charge energy into your home-battery when price level is cheap or very cheap (see below)
Template-Sensors
You can setup the template sensors via UI as “helpers”. Here is the state-template for the sensors:
- price-range
{{ ((state_attr("sensor.electricity_price_wester_esch_26b","max_price") | float(default=0) - state_attr("sensor.electricity_price_wester_esch_26b","min_price") | float(default=0)) * 100) | round(1) }}
- how close is the current price to the max price in percent
{{ (((states("sensor.electricity_price_wester_esch_26b") | float(default=0) - state_attr("sensor.electricity_price_wester_esch_26b","min_price") | float(default=0)) / (state_attr("sensor.electricity_price_wester_esch_26b","max_price") | float(default=0) - state_attr("sensor.electricity_price_wester_esch_26b","min_price") | float(default=0))) * 100) | round(0) }}
daily, weekly, monthly and yearly costs per kwh (replace “daily” with “weekly”, “monthly” or “yearly”)
{{ (states("sensor.tibber_kosten_daily") | float(default=0) / states("sensor.tibber_verbrauch_daily") | float(default=0) * 100) | float(default=0) }}
Sensor that knows if it is before 13h (1pm)

Input-Boolean (Helper) that show if the home battery should be charged or not

Automation
The automation does the following things:
-
IF price-level changes to “cheap” or “very cheap”
-
AND IF home battery is below 95% charge AND the expected remaining solar energy today is lower then the capacity of the home battery
-
THEN start charging your home battery
-
ELSE IF price-level changes to “normal”, “expensive” or “very expensive”
-
OR home battery is above 95% charge
-
THEN stop charging your home battery
alias: Tibber - Speicher günstig laden
description: ""
trigger:
- platform: state
entity_id:
- sensor.tibber_price_level
to: VERY_CHEAP
id: sehr günstig
- platform: state
entity_id:
- sensor.tibber_price_level
to: CHEAP
id: günstig
- platform: state
entity_id:
- sensor.tibber_price_level
to: NORMAL
id: normal
- platform: state
entity_id:
- sensor.tibber_price_level
to: EXPENSIVE
id: teuer
- platform: state
entity_id:
- sensor.tibber_price_level
to: VERY_EXPENSIVE
id: sehr teuer
- platform: numeric_state
entity_id:
- sensor.senec_battery_charge_percent
above: 95
id: Speicher ist voll
condition: []
action:
- choose:
- conditions:
- condition: trigger
id:
- Speicher ist voll
- normal
- teuer
- sehr teuer
sequence:
- service: input_boolean.turn_off
target:
entity_id: input_boolean.tibber_speicher_laden
data: {}
- type: turn_off
device_id: ba6662be81284ab19a7ff2a25d6c1c64
entity_id: 4938b65e9c7938a7bfebb628361a12fb
domain: switch
enabled: true
- conditions:
- condition: trigger
id:
- sehr günstig
- günstig
- condition: numeric_state
entity_id: sensor.senec_battery_charge_percent
below: 95
- condition: numeric_state
entity_id: sensor.solar_restproduktion_heute
below: 5
sequence:
- service: input_boolean.turn_on
target:
entity_id: input_boolean.tibber_speicher_laden
data: {}
- type: turn_on
device_id: ba6662be81284ab19a7ff2a25d6c1c64
entity_id: 4938b65e9c7938a7bfebb628361a12fb
domain: switch
enabled: true
mode: single


