Finalement, je suis resté sur la commande RESTful. En effet, BDPV envoie un mail à chaque appel à l’API. Ce faisant, je sais si tout s’est bien passé.
J’ai donc créer une commande dans mon fichier configuration.yaml
rest_command:
bdpv_send_index:
url: "https://www.bdpv.fr/webservice/majProd/expeditionProd_v3.php?util=xxx&apiKey=xxx&source=homeassistant&typeReleve=onduleur&index={{ (states.sensor.primo_3_6_1_1_energy_total.state|int) }}"
method: POST
Ensuite, j’ai créer une automatisation qui appelle la commande à 4h35 tous les jours.
Voilà le code (bien que fait depuis l’UI)
alias: Envoi BDPV
description: ""
trigger:
- platform: time
at: "04:35:00"
condition: []
action:
- service: rest_command.bdpv_send_index
data: {}
mode: single
Merci pour les conseils!