Update solarlog template sensor example (#20274)

This commit is contained in:
SNoof85 2021-11-12 08:33:50 +01:00 committed by GitHub
parent b8689691f2
commit 08529a9e4e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 %}