# Awattar die 3 billigsten Stunden raus finden

**URL:** <https://community-smarthome.com/t/awattar-die-3-billigsten-stunden-raus-finden/3346>\
**Category:** YAML\
**Created:** [21. Januar 2025 um 19:57 UTC](https://community-smarthome.com/t/awattar-die-3-billigsten-stunden-raus-finden/3346 "2025-01-21T19:57:50Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![KingJosef](https://community-smarthome.com/user_avatar/community-smarthome.com/kingjosef/32/459_2.png) [@KingJosef](https://community-smarthome.com/u/KingJosef)\
**Post date:** [21. Januar 2025 um 19:57 UTC](https://community-smarthome.com/t/awattar-die-3-billigsten-stunden-raus-finden/3346/1 "2025-01-21T19:57:50Z")

</div>

also die Darstellung etc läuft alle , auch wird der billigste und teuerste Preis angezeit

laut dem der das geschrieben hat gibt es noch 2 Einträge

> 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:

```auto
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:

```auto
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

```

also soll er wohl die 2 billigsten Stunden anzeigen  
aber auf welchen sensor bezieht sich das ?  
soweit ich dem Englischen mächtig bin kriegt er dann eine notification aufs handy (was ich eigendlich nicht brauche)

was ich nicht versteh der erste intrag kommt in die configuration .yaml aber wohin kommt der 2.

---

<div class="post-metadata">

**Author:** ![jayjojayson](https://community-smarthome.com/user_avatar/community-smarthome.com/jayjojayson/32/639_2.png) [@jayjojayson](https://community-smarthome.com/u/jayjojayson)\
**Post date:** [21. Januar 2025 um 20:22 UTC](https://community-smarthome.com/t/awattar-die-3-billigsten-stunden-raus-finden/3346/2 "2025-01-21T20:22:35Z")

</div>

Was das für ein Sensor sein soll, kann ich dir auch nicht sagen. Irgendwie ein Mischung aus Automatisierung und Sensor. Geht sowas überhaupt 🤔 denke eigentlich nicht.

---

<div class="post-metadata">

**Author:** ![KingJosef](https://community-smarthome.com/user_avatar/community-smarthome.com/kingjosef/32/459_2.png) [@KingJosef](https://community-smarthome.com/u/KingJosef)\
**Post date:** [21. Januar 2025 um 20:35 UTC](https://community-smarthome.com/t/awattar-die-3-billigsten-stunden-raus-finden/3346/3 "2025-01-21T20:35:26Z")

</div>

es geht um  
[GitHub - mampfes/ha\_epex\_spot\_sensor: Provides helper sensors for EPEX Spot integration.](https://github.com/mampfes/ha_epex_spot_sensor) der auch die Epex Spot integration gemacht hat

alles in den Übersetzter eingeben ist ja mühsam , warum hab ich nix in der Schule gelernt 🕶

der erstellt wohl einen Helfer

---

<div class="post-metadata">

**Author:** ![KingJosef](https://community-smarthome.com/user_avatar/community-smarthome.com/kingjosef/32/459_2.png) [@KingJosef](https://community-smarthome.com/u/KingJosef)\
**Post date:** [22. Januar 2025 um 04:00 UTC](https://community-smarthome.com/t/awattar-die-3-billigsten-stunden-raus-finden/3346/4 "2025-01-22T04:00:32Z")

</div>

guten morgen

kurzes Fazit , der Helfer klappt super hab den mal auf die 3 billigsten Stunden eingestellt und in der Nacht hat er sich mal die 2 billigsten genommen und am Abend (Nacht) sollte er die 3. nehmen

 ![image](https://community-smarthome.com/uploads/default/original/2X/1/19ab38443bfd9fae6cea35576bec9183683299bd.png)

---

<div class="post-metadata">

**Author:** ![jayjojayson](https://community-smarthome.com/user_avatar/community-smarthome.com/jayjojayson/32/639_2.png) [@jayjojayson](https://community-smarthome.com/u/jayjojayson)\
**Post date:** [22. Januar 2025 um 06:35 UTC](https://community-smarthome.com/t/awattar-die-3-billigsten-stunden-raus-finden/3346/5 "2025-01-22T06:35:27Z")

</div>

Guten Morgen, wie hast du den Helfer dann genau erstellt? Mit dem Code von oben?

---

<div class="post-metadata">

**Author:** ![KingJosef](https://community-smarthome.com/user_avatar/community-smarthome.com/kingjosef/32/459_2.png) [@KingJosef](https://community-smarthome.com/u/KingJosef)\
**Post date:** [22. Januar 2025 um 06:41 UTC](https://community-smarthome.com/t/awattar-die-3-billigsten-stunden-raus-finden/3346/6 "2025-01-22T06:41:38Z")

</div>

genau mit

> **[GitHub - mampfes/ha\_epex\_spot\_sensor: Provides helper sensors for EPEX Spot integration.](https://github.com/mampfes/ha_epex_spot_sensor)**
>
> Provides helper sensors for EPEX Spot integration.

---

<div class="post-metadata">

**Author:** ![jayjojayson](https://community-smarthome.com/user_avatar/community-smarthome.com/jayjojayson/32/639_2.png) [@jayjojayson](https://community-smarthome.com/u/jayjojayson)\
**Post date:** [22. Januar 2025 um 06:44 UTC](https://community-smarthome.com/t/awattar-die-3-billigsten-stunden-raus-finden/3346/7 "2025-01-22T06:44:05Z")

</div>

Ja, schon klar, mich würde interessieren wie du den Helfer jetzt genau definiert hast?

---

<div class="post-metadata">

**Author:** ![KingJosef](https://community-smarthome.com/user_avatar/community-smarthome.com/kingjosef/32/459_2.png) [@KingJosef](https://community-smarthome.com/u/KingJosef)\
**Post date:** [22. Januar 2025 um 06:46 UTC](https://community-smarthome.com/t/awattar-die-3-billigsten-stunden-raus-finden/3346/8 "2025-01-22T06:46:46Z")

</div>

meinst die Einstellungen ?  
wenn du den Helfer hinzufügst kommt

 ![image](https://community-smarthome.com/uploads/default/original/2X/9/9cf0e696d05cebd333733ceeb5f4d15ec2c6d471.png)  
 ![image](https://community-smarthome.com/uploads/default/original/2X/f/fd036278747db8e0d1a614bd8dcc27e1471d9b76.png)

---

<div class="post-metadata">

**Author:** ![jayjojayson](https://community-smarthome.com/user_avatar/community-smarthome.com/jayjojayson/32/639_2.png) [@jayjojayson](https://community-smarthome.com/u/jayjojayson)\
**Post date:** [22. Januar 2025 um 07:38 UTC](https://community-smarthome.com/t/awattar-die-3-billigsten-stunden-raus-finden/3346/9 "2025-01-22T07:38:55Z")

</div>

> [@KingJosef](#):
>
> > 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:
> 
> ```auto
> 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 }}"
> 
> ```

Mich interessiert, wie dieser Teil jetzt gelöst wurde. Wo und wie hast du das eingetragen, oder hast du jetzt doch einen anderen Code an dieser Stelle verwendet?

---

<div class="post-metadata">

**Author:** ![KingJosef](https://community-smarthome.com/user_avatar/community-smarthome.com/kingjosef/32/459_2.png) [@KingJosef](https://community-smarthome.com/u/KingJosef)\
**Post date:** [22. Januar 2025 um 08:29 UTC](https://community-smarthome.com/t/awattar-die-3-billigsten-stunden-raus-finden/3346/10 "2025-01-22T08:29:32Z")

</div>

Kannst vergessen das war scheinbar Altlast  
Es reicht der Github Helfer  
Sorry wegen dem ducheinander

---

<div class="post-metadata">

**Author:** ![jayjojayson](https://community-smarthome.com/user_avatar/community-smarthome.com/jayjojayson/32/639_2.png) [@jayjojayson](https://community-smarthome.com/u/jayjojayson)\
**Post date:** [22. Januar 2025 um 09:55 UTC](https://community-smarthome.com/t/awattar-die-3-billigsten-stunden-raus-finden/3346/11 "2025-01-22T09:55:09Z")

</div>

Ah gut, dann macht es auch Sinn! 🙂
