Skip to content

Commit

Permalink
Merge pull request #215 from trip5/2023.9.1
Browse files Browse the repository at this point in the history
Update weather-display.md
  • Loading branch information
lubeda authored Feb 25, 2024
2 parents 16b4fe0 + 96a02cc commit d99e264
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions wiki/weather-display.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,15 @@ action:
g: 192
b: 192
```
### How to add error-checking to sensors which may go offline (and cause the script to abort)
```
text: >
{% set state = states('sensor.openweathermap_temperature') %} {% if
is_number(state) %}
{{ state|round(1) }}°
{% else %}
{{ "error" }}
{% endif %}
```

0 comments on commit d99e264

Please sign in to comment.