Skip to content

Commit

Permalink
Merge pull request #218 from trip5/patch-1
Browse files Browse the repository at this point in the history
Update weather-display.md
  • Loading branch information
lubeda authored Mar 9, 2024
2 parents 07c3143 + c755e92 commit 4125c41
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions wiki/weather-display.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,27 @@ action:
g: 192
b: 192
```
### Add error-checking to sensors which may go offline (note the continue_on_error bit too!)
```
- service: esphome.pixelclock_icon_screen
data:
default_font: true
icon_name: >-
weather_{{ states('sensor.openweathermap_condition')|replace("-",
"_") }}
text: >
{% set state = states('sensor.openweathermap_temperature') %} {% if
is_number(state) %}
{{ state|round(1) }}°
{% else %}
{{ "error" }}
{% endif %}
lifetime: 5
screen_time: 3
r: 192
g: 192
b: 192
continue_on_error: true
```

0 comments on commit 4125c41

Please sign in to comment.