From 7d48aaa402d15d1f15e0ba6f5d0f10ee5dca13db Mon Sep 17 00:00:00 2001 From: SNoof85 Date: Fri, 22 Oct 2021 21:46:13 +0200 Subject: [PATCH] Solaredge, update template sensors examples (#19909) --- source/_integrations/solaredge.markdown | 9 ++++----- source/_integrations/solaredge_local.markdown | 13 ++++++------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/source/_integrations/solaredge.markdown b/source/_integrations/solaredge.markdown index 8b0ea95a485..6c3ada5f94e 100644 --- a/source/_integrations/solaredge.markdown +++ b/source/_integrations/solaredge.markdown @@ -33,11 +33,10 @@ In case you would like to convert the values for example to kWh instead of the d ```yaml # Example configuration.yaml entry for template platform -sensor: - platform: template - sensors: - solaredge_energy_this_year_template: - value_template: "{{ (states('sensor.solaredge_energy_this_year') | float / 1000) | round(2) }}" +template: + - sensor: + - name: solaredge_energy_this_year_template: + state: "{{ (states('sensor.solaredge_energy_this_year') | float / 1000) | round(2) }}" ``` {% endraw %} diff --git a/source/_integrations/solaredge_local.markdown b/source/_integrations/solaredge_local.markdown index 620760f7361..c42cdd73dc3 100644 --- a/source/_integrations/solaredge_local.markdown +++ b/source/_integrations/solaredge_local.markdown @@ -69,13 +69,12 @@ In case you would like to convert the values for example to kWh instead of the d ```yaml # Example configuration.yaml entry for sensor template platform -sensor: - - platform: template - sensors: - solaredge_energy_this_year_template: - value_template: "{{ (states('sensor.solaredge_energy_this_year') | float / 1000) | round(2) }}" - unit_of_measurement: "KWh" - icon_template: "mdi:solar-power" +template: + - sensor: + - name: solaredge_energy_this_year_template: + state: "{{ (states('sensor.solaredge_energy_this_year') | float / 1000) | round(2) }}" + unit_of_measurement: "KWh" + icon: "mdi:solar-power" ``` {% endraw %}