Pour le code le voila (a mettre dans configuration.yaml)
Code :
sensor:
#Capteur en watt heure production
- platform: integration
source: sensor.voltronic_1_pv_watt
name: production_pv_wh
unit_prefix: k
round: 3
method: left
#Capteur en watt heure consommation maison
- platform: integration
source: sensor.voltronic_1_conso_maison_watt
name: conso_maison_wh
unit_prefix: k
round: 3
method: left
utility_meter:
#Consomation maison par cycle, année, mois, jour, heure
conso_maison_wh_annee:
source: sensor.conso_maison_wh
cycle: yearly
conso_maison_wh_mois:
source: sensor.conso_maison_wh
cycle: monthly
conso_maison_wh_jour:
source: sensor.conso_maison_wh
cycle: daily
conso_maison_wh_heure:
source: sensor.conso_maison_wh
cycle: hourly
#Production PV par cycle, année, mois, jour, heure
production_pv_wh_annee:
source: sensor.production_pv_wh
cycle: yearly
production_pv_wh_mois:
source: sensor.production_pv_wh
cycle: monthly
production_pv_wh_jour:
source: sensor.production_pv_wh
cycle: daily
production_pv_wh_heure:
source: sensor.production_pv_wh
cycle: hourly