Hi.
Nachdem man EPEX installiert hat, hat man die entsprechenden Senoren in Home Assistant.
Diese Intergration kann man entsprechend konfigurieren, je nach dem, was der Provider vorgibt. In meinem Fall gibt es einen Aufschlag von 1,2ct auf den Spot Preis sowie 20% USt.
Daher sieht meine Konfiguration aus wie folgt:
Ich nehme an, mit den Tabellen meinst Du das hier:
Ich habe etwas Zeit und Mühe investiert, alles unter 10 ist grünlich, zwischen 10 und 20 geht’s über gelb in orange, und ab 20ct/KWh geht’s in den roten, dann tiefroten Bereich.
Dazu muss man sich die apexcharts card über HACS installieren. Die Konfiguration sieht dann z.B. so aus:
Außerdem habe ich mir einen Helper definiert, der mir von 14 bis 23 Uhr die Werte des nächsten Tages (dann allerdings in grau zum Unterscheiden) anzeigt. Ab 24 Uhr sind dann das die aktuellen Werte - die Werte für den nächsten Tag sind noch nicht da und daher wird die Karte erst wieder um 14 Uhr (mit den dann neuen und verfügbaren Werten) angezeigt.
This is amazing
I am starting looking into spot prices / awattar two days ago, as I have a battery in my basement and less to no solar production. Charging the battery with cheaper energy during night and using it during the day would be great.
I have the integration for epex running and get information. The charts are something I will look into a little later, but I have two questions:
Is it possible to create the template sensor for the lowest/highest prices also via GUI?
Has anyone thought about creating a blueprint to charge a device based on conditions like lowest price etc. so the automation gets simpler for people and therefor switching to such a model?
I am trying to get the sensor up and running via configuration.yml
I copied the example from github and get the sensor but its state is always “unknown”
template:
- trigger:
- platform: time
at: "08:20:00"
action:
- service: epex_spot.get_lowest_price_interval
data:
duration:
hours: 3
minutes: 0
seconds: 0
response_variable: resp
sensor:
- name: Start Appliance
device_class: timestamp
state: "{{ resp.start is defined and resp.start }}"
- name: Stop Appliance
device_class: timestamp
state: "{{ resp.stop is defined and resp.stop }}"
If I call the service via Developer Tools, I do get information.
Hi.
First I need the sensor to get the 2 hours cheap window. Here I created this to get the infromation each day at 14:30 (when the data is available for the next day:
template:
- trigger:
- platform: time
at: "14:30:00"
action:
- service: epex_spot.get_lowest_price_interval
data:
earliest_start: "23:59:00"
duration:
hours: 2
response_variable: resp
sensor:
- name: Zwei Stunden Fenster Strom
device_class: timestamp
state: "{{ resp.start is defined and resp.start }}"
Based on that I have created a small automation for the helper, called input_datetime.start_gunstigste_2_stunden_zeitfenster - in addtion I get a notification on my mobile with the information each day at 6 and set the helper. Afterwards I can use the helper for any other automation as a trigger:
alias: "Power: Set time for cheapest hour"
description: ""
trigger:
- platform: time
at: "18:00:00"
condition:
- condition: not
conditions:
- condition: state
entity_id: sensor.zwei_stunden_fenster_strom
state: unavailable
action:
- service: input_datetime.set_datetime
data:
time: >-
{{ as_timestamp(states('sensor.zwei_stunden_fenster_strom')) |
timestamp_custom('%H:%M') }}
target:
entity_id: input_datetime.start_gunstigste_2_stunden_zeitfenster
- data:
title: Strom Update!
message: >-
2-Stunden-Zeitfenster für morgen: <b><span style="color: red"> {{
as_timestamp(states('sensor.zwei_stunden_fenster_strom')) |
timestamp_custom('%H:%M') }} Uhr </span></b> bis <b><span style="color:
red"> {{ (states('sensor.zwei_stunden_fenster_strom')|as_timestamp +
(120*60))|timestamp_custom("%H:%M", True) }} Uhr</span></b>!
data:
icon_url: >-
https://icons.iconarchive.com/icons/icons8/windows-8/256/Weather-Storm-icon.png
service: notify.mobile_app_pixel_7_pro
Regarding the graph span: I have two cards with 24h - the current day and the next day (after 2, when the data is available until 23 - as a preview).
The code to show the card from 14:00 to 23:00 look like this:
With the sensor and the helper you can trigger or show whatever you want. You just need to be careful when the data is available and if you are on the current or next day.
P.S. there might be better ways now, but I added some additional topics step by step
i can find this service in the devtools and it gives me the values correctly, but when i copy your code to a helper - template it always gives me unavaliable. why?
hi again, for some reason the logic to display the card only from 14-23 doesnt work for me. when i click on test the condition it always says: condition not true. it says that always. i tried several differnt things but nothing workd. what could it be?
Hello, maybe someone knows. In the energy configuration I have a Shelly 3em and the epex spot net price from awattar for the price.
Unfortunately the calculation doesn’t work. This is far too high. If I only set the price per megawatt hour, then it calculates in cents, but the network costs and VAT are not included
Does anyone have a solution for this?
Thanks
Hello everyone. First of all, thank you for the great integration.
If the time zone is UTC 00:00, then I always have an offset. So if I have the cheapest hours calculated, aren’t they correct?!? Or am I wrong?
The timestamps are correct, they are just displayed in UTC time (which has an offset to CET/CEST of 1/2h) in the developers view. Automations and sensors automatically take care of this and convert it to local time if necessary.
hy,
i’ve added the two apex charts from webwude (costs today and costs tomorrow).
I see the two cards, but when i click on “exit/fertig” i only see the price today card.
Does anybody know why?
Thank you
christian