Hi Oncleben31,
Thanks for information. The linky custom_components is working on my side now, but I have this error :
invalid config for [sensor.linky_custom]: [monitored_variables] is an invalid option for [sensor.linky_custom]. Check: sensor.linky_custom->monitored_variables.
when I’m trying to have day -1 cost, consumption with the following template :
- platform: template
sensors:
conso_hp:
friendly_name: “Consommation de la veille en heures pleines”
unit_of_measurement: ‘kWh’
value_template: “{{(float(states.sensor.linky_halfhourly_00_00_consumption.state)+float(states.sensor.linky_halfhourly_01_00_consumption.state)+float(states.sensor.linky_halfhourly_07_00_consumption.state)+float(states.sensor.linky_halfhourly_08_00_consumption.state)+float(states.sensor.linky_halfhourly_09_00_consumption.state)+float(states.sensor.linky_halfhourly_10_00_consumption.state)+float(states.sensor.linky_halfhourly_11_00_consumption.state)+float(states.sensor.linky_halfhourly_12_00_consumption.state)+float(states.sensor.linky_halfhourly_13_00_consumption.state)+float(states.sensor.linky_halfhourly_17_00_consumption.state)+float(states.sensor.linky_halfhourly_18_00_consumption.state)+float(states.sensor.linky_halfhourly_19_00_consumption.state)+float(states.sensor.linky_halfhourly_20_00_consumption.state)+float(states.sensor.linky_halfhourly_21_00_consumption.state)+float(states.sensor.linky_halfhourly_22_00_consumption.state)+float(states.sensor.linky_halfhourly_23_00_consumption.state)+float(states.sensor.linky_halfhourly_00_30_consumption.state)+float(states.sensor.linky_halfhourly_01_30_consumption.state)+float(states.sensor.linky_halfhourly_07_30_consumption.state)+float(states.sensor.linky_halfhourly_08_30_consumption.state)+float(states.sensor.linky_halfhourly_09_30_consumption.state)+float(states.sensor.linky_halfhourly_10_30_consumption.state)+float(states.sensor.linky_halfhourly_11_30_consumption.state)+float(states.sensor.linky_halfhourly_12_30_consumption.state)+float(states.sensor.linky_halfhourly_13_30_consumption.state)+float(states.sensor.linky_halfhourly_17_30_consumption.state)+float(states.sensor.linky_halfhourly_18_30_consumption.state)+float(states.sensor.linky_halfhourly_19_30_consumption.state)+float(states.sensor.linky_halfhourly_20_30_consumption.state)+float(states.sensor.linky_halfhourly_21_30_consumption.state)+float(states.sensor.linky_halfhourly_22_30_consumption.state)+float(states.sensor.linky_halfhourly_23_30_consumption.state)) / 2}}”
conso_hc:
friendly_name: “Consommation de la veille en heures creuses”
unit_of_measurement: ‘kWh’
value_template: ‘{{(float(states.sensor.linky_halfhourly_02_00_consumption.state)+float(states.sensor.linky_halfhourly_04_00_consumption.state)+float(states.sensor.linky_halfhourly_05_00_consumption.state)+float(states.sensor.linky_halfhourly_06_00_consumption.state)+float(states.sensor.linky_halfhourly_14_00_consumption.state)+float(states.sensor.linky_halfhourly_15_00_consumption.state)+float(states.sensor.linky_halfhourly_16_00_consumption.state)+float(states.sensor.linky_halfhourly_02_30_consumption.state)+float(states.sensor.linky_halfhourly_04_30_consumption.state)+float(states.sensor.linky_halfhourly_05_30_consumption.state)+float(states.sensor.linky_halfhourly_06_30_consumption.state)+float(states.sensor.linky_halfhourly_14_30_consumption.state)+float(states.sensor.linky_halfhourly_15_30_consumption.state)+float(states.sensor.linky_halfhourly_16_30_consumption.state))/2}}’
conso_mensuelle_glissante:
friendly_name: “Consommation sur 1 mois glissant”
unit_of_measurement: “kWh”
value_template: “{{(float(states.sensor.linky_daily_1d_consumption.state) + float(states.sensor.linky_daily_2d_consumption.state) + float(states.sensor.linky_daily_3d_consumption.state) + float(states.sensor.linky_daily_4d_consumption.state) + float(states.sensor.linky_daily_5d_consumption.state) + float(states.sensor.linky_daily_6d_consumption.state) + float(states.sensor.linky_daily_7d_consumption.state) + float(states.sensor.linky_daily_8d_consumption.state) + float(states.sensor.linky_daily_9d_consumption.state) + float(states.sensor.linky_daily_10d_consumption.state) + float(states.sensor.linky_daily_11d_consumption.state) + float(states.sensor.linky_daily_12d_consumption.state) + float(states.sensor.linky_daily_13d_consumption.state) + float(states.sensor.linky_daily_14d_consumption.state) + float(states.sensor.linky_daily_15d_consumption.state) + float(states.sensor.linky_daily_16d_consumption.state) + float(states.sensor.linky_daily_17d_consumption.state) + float(states.sensor.linky_daily_18d_consumption.state) + float(states.sensor.linky_daily_19d_consumption.state) + float(states.sensor.linky_daily_20d_consumption.state) + float(states.sensor.linky_daily_21d_consumption.state) + float(states.sensor.linky_daily_22d_consumption.state) + float(states.sensor.linky_daily_23d_consumption.state) + float(states.sensor.linky_daily_24d_consumption.state) + float(states.sensor.linky_daily_25d_consumption.state) + float(states.sensor.linky_daily_26d_consumption.state) + float(states.sensor.linky_daily_27d_consumption.state) + float(states.sensor.linky_daily_28d_consumption.state) + float(states.sensor.linky_daily_29d_consumption.state))}}”
cout:
friendly_name: “Coût de la veille”
unit_of_measurement: ‘€’
value_template: “{{((float(states.sensor.conso_hc.state) * float(0.1244)) + (float(states.sensor.conso_hp.state) * float(0.1593)))}}”
rapport_hc_hp:
friendly_name: “Taux de consommation en heures creuses”
unit_of_measurement: ‘%’
value_template: “{%- set conso_totale = float(states.sensor.conso_hc.state) + float(states.sensor.conso_hp.state) -%}{% if conso_totale > 0 %}{{(float(states.sensor.conso_hc.state) / conso_totale * 100)}}{% else %}N/A{% endif %}”
evolution_conso_mensuelle:
friendly_name: “Évolution de la consommation mensuelle”
unit_of_measurement: ‘%’
value_template: “{{((float(states.sensor.conso_mensuelle_glissante.state) - float(states.sensor.linky_monthly_1m_consumption.state)) / float(states.sensor.linky_monthly_1m_consumption.state) * 100)}}”
did you use a template to have more information about linky ?
Best.