Get EDF Tempo information

Hello,
This is not the first year that the service has stopped working during the summer and then become available again.
I would recommend that you wait before making any changes.

Hi c4rr3r4

have you find a solution to integrate the RTE Api ?
can you share you code for the sensor and the display?
thank you

Here the last code I use :

configuration.yaml

rest: !include rest.yaml

rest.yaml

- resource_template: https://particulier.edf.fr/services/rest/referentiel/searchTempoStore?dateRelevant={{now().strftime("%Y-%m-%d")}}
  scan_interval: 3600
  sensor:
    - name: "Tempo Demain"
      value_template: "{{ value_json.couleurJourJ1 }}"
    - name: "Tempo Aujourd'hui"
      value_template: "{{ value_json.couleurJourJ }}"
- resource: https://particulier.edf.fr/services/rest/referentiel/getNbTempoDays?TypeAlerte=TEMPO
  scan_interval: 3600
  sensor:
    - name: "Jours Rouge restants"
      value_template: "{{ value_json.PARAM_NB_J_ROUGE }}"
    - name: "Jours Blanc restants"
      value_template: "{{ value_json.PARAM_NB_J_BLANC }}"
    - name: "Jours Bleu restants"
      value_template: "{{ value_json.PARAM_NB_J_BLEU }}"

Using rest in place of sensors permits to get all data from one API call.

5 Likes

Hi,
I would like to create an automation with this sensor. When it change from NON_DEFINI to BLEU or BLANC, I would do an action. The issue is I can’t put NON_DEFINI in the « FROM » box. Do you know why and what can I do ?

Thanks in advance

Hello Nouch77
I did this automation and it works fine for me. I received an alert on my mobile phone when the state moved from NON_DEFINI to BLEU.
Funilly enough, I forgot to put BLEU in the To: field, and I received the message, so you can do that if you just want to detect when the value change.
BR

great job, please can you share your template code? steplait, steplait…

Sorry for the delay, I did not received any notifications from the forum :thinking:

Documentation was buggy from v1.0.0 to v1.1.0, it has been fixed since :slight_smile:

For the refresh, it is a bit more complicated than that:

  • If the integration has the next day color, it goes to sleep until next day at 6am
  • If it does not have the next day color, it retries every 30 minutes
  • If anything went wrong (like API down or network issue) it is retried after 10 minutes

And each of these delays are a bit randomized to avoid everyone hammering the RTE API at the same time !

You can check the current implementation details here.

2 Likes

I just wanted to add that this article really helped me:

In my case, I don’t have anything connected to the Linky: I only have a Shelly EM reading imported and exported energy.

So to couple the prices with the RTE Tempo integration from @hekmon, I have created a bunch of entries:

First one input number for each combination of Color and HP / HC.

Then I have created a utility meter with 6 tariffs + TRV (this will auto-create 7 utility meters with a selector)

I can then create these cards to set prices and select the current utility meter where the read energy data will go:

But now, the magic is that thanks to the RTE Temp plugin, I can have a script and an automation that will automatically switch the right utility meter to use:

The script:

alias: "Grid: Energy Meter Selection"
sequence:
  - choose:
      - conditions:
          - condition: state
            entity_id: sensor.rte_tempo_couleur_actuelle
            state: Bleu
          - type: is_on
            condition: device
            device_id: 9c2a0444638b52b827cc51a274c5d1f9
            entity_id: binary_sensor.rte_tempo_heures_creuses
            domain: binary_sensor
        sequence:
          - service: select.select_option
            data:
              option: EDF Tempo Bleu HC
            target:
              entity_id: select.grid_energy_meter
      - conditions:
          - condition: state
            entity_id: sensor.rte_tempo_couleur_actuelle
            state: Bleu
          - type: is_off
            condition: device
            device_id: 9c2a0444638b52b827cc51a274c5d1f9
            entity_id: binary_sensor.rte_tempo_heures_creuses
            domain: binary_sensor
        sequence:
          - service: select.select_option
            data:
              option: EDF Tempo Bleu HP
            target:
              entity_id: select.grid_energy_meter
      - conditions:
          - condition: state
            entity_id: sensor.rte_tempo_couleur_actuelle
            state: Blanc
          - type: is_on
            condition: device
            device_id: 9c2a0444638b52b827cc51a274c5d1f9
            entity_id: binary_sensor.rte_tempo_heures_creuses
            domain: binary_sensor
        sequence:
          - service: select.select_option
            data:
              option: EDF Tempo Blanc HC
            target:
              entity_id: select.grid_energy_meter
      - conditions:
          - condition: state
            entity_id: sensor.rte_tempo_couleur_actuelle
            state: Blanc
          - type: is_off
            condition: device
            device_id: 9c2a0444638b52b827cc51a274c5d1f9
            entity_id: binary_sensor.rte_tempo_heures_creuses
            domain: binary_sensor
        sequence:
          - service: select.select_option
            data:
              option: EDF Tempo Blanc HP
            target:
              entity_id: select.grid_energy_meter
      - conditions:
          - condition: state
            entity_id: sensor.rte_tempo_couleur_actuelle
            state: Rouge
          - type: is_on
            condition: device
            device_id: 9c2a0444638b52b827cc51a274c5d1f9
            entity_id: binary_sensor.rte_tempo_heures_creuses
            domain: binary_sensor
        sequence:
          - service: select.select_option
            data:
              option: EDF Tempo Rouge HC
            target:
              entity_id: select.grid_energy_meter
      - conditions:
          - condition: state
            entity_id: sensor.rte_tempo_couleur_actuelle
            state: Rouge
          - type: is_off
            condition: device
            device_id: 9c2a0444638b52b827cc51a274c5d1f9
            entity_id: binary_sensor.rte_tempo_heures_creuses
            domain: binary_sensor
        sequence:
          - service: select.select_option
            data:
              option: EDF Tempo Rouge HP
            target:
              entity_id: select.grid_energy_meter
mode: single
icon: mdi:script-text

The automation:

alias: "Grid: Energy Meter Selection"
description: ""
trigger:
  - type: turned_on
    platform: device
    device_id: 9c2a0444638b52b827cc51a274c5d1f9
    entity_id: binary_sensor.rte_tempo_heures_creuses
    domain: binary_sensor
  - type: turned_off
    platform: device
    device_id: 9c2a0444638b52b827cc51a274c5d1f9
    entity_id: binary_sensor.rte_tempo_heures_creuses
    domain: binary_sensor
  - platform: state
    entity_id:
      - sensor.rte_tempo_couleur_actuelle
condition: []
action:
  - service: script.grid_energy_meter_selection
    data: {}
mode: single

Device ID 9c2a0444638b52b827cc51a274c5d1f9 is actually the RTE Tempo device created by the RTE Tempo integration.

Then in the Energy Dashboard, we need to add all the utility meters, and for each one, link it with the corresponding price entity

2 Likes

I am glad you got it working :blush:

1 Like

I was even not lazy enough to add the utility meters for weekly, monthly and yearly stats :wink:

Bonjour, j’ai tanté de suivre ton poste mais dès le départ mes “entrée” de type compteur ne ressortent pas comme les tiennes.
En effet j’ai deux “entrées”

Hello All. Salut à tous.

The subject was well discussed on the french forum, and I do not know if it reached this post, but a good addition in case of tempo contract if you want to recover your linky information without RTE or EDF API is the Zlinky module by lixee. For approx 50€ this small zigbee module is plugged on the TIC (teleinfo) terminal bloc of the linky and gives you all information available at Linky level, including tempo color of the day, tempo color of next day (at 20h00) index for all six cases (HP/HC blue, white and Red), apparent power, intensity etc…

This can be well integrated with the energy dashboard as well…

Regards

BBE

Ps: french speaker might find additional information here:

or here:

Hello :slight_smile:

@mathieucarbou when you create the counters, which entry sensor do you use for each one ?

Hello guys,

Sorry for not answering to all the mentions above : I forgot to activate email notifications…

So I’ve put a lot of HA integrations in my Gists:

https://gist.github.com/mathieucarbou

There are some regarding Linky / Tempo / etc amongst some others.

I’ve also changed how I manage things so it’s improved. I basically rely more on a Linky TIC now, and merge the data with RTE for the upcoming colors. Current color code is taken from the linky which is more reliable, as for the energy data.

Happy HA-cking everyone :blush:

1 Like

Reminder:

Non-English posts have been removed.

hello,
Thank you for your sharing because it is not easy to configure tempo :).
So I configured the script, automation and all the helpers using the tempo.yaml file from @mathieucarbou. All these helpers/entities have the sensor “source: sensor.grid_energy” but I don’t see how to configure this source because on the TIC of the linky I have the HPHC and HPHC. If anyone has an idea how to create this sensor which would allow switching

Thanks
Thel77

sensor.grid_* are my Shelly EM sensors

1 Like

Hi,

Did someone manage to get today+tomorrow tempo color in HA? I would be interested in knowing how to do that since former EDF json link is out of service.

Thanks.

You can use the RTE Tempo integration available in HACS.

2 Likes

This one works perfectly, thank you very much!!