From 08529a9e4ec9f9448fc05bfc522c0ebfb521073c Mon Sep 17 00:00:00 2001 From: SNoof85 Date: Fri, 12 Nov 2021 08:33:50 +0100 Subject: [PATCH] Update solarlog template sensor example (#20274) --- source/_integrations/solarlog.markdown | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/source/_integrations/solarlog.markdown b/source/_integrations/solarlog.markdown index bdc46f08f62..c523630f14e 100644 --- a/source/_integrations/solarlog.markdown +++ b/source/_integrations/solarlog.markdown @@ -35,11 +35,10 @@ In case you would like to convert the values, for example, to Wh instead of the ```yaml # Example configuration.yaml entry for sensor template platform -sensor: - - platform: template - sensors: - solarlog_yield_day_template: - value_template: "{{ (states('sensor.solarlog_yield_day') | float * 1000) | round(0) }}" +template: + - sensor: + - name: "Solarlog yield day" + state: "{{ (states('sensor.solarlog_yield_day') | float(default=0) * 1000) | round(0,default=0) }}" ``` {% endraw %}