Created
July 20, 2024 17:03
-
-
Save dj-bauer/57e84c3de5723356b5435b73b18ea375 to your computer and use it in GitHub Desktop.
Awtrix 3 Unwetter warnung blueprint
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
blueprint: | |
name: AWTRIX Unwetter alerts | |
description: Unwetter warnungen auf dem AWTRIX Display anzeigen | |
author: DJ-Bauer | |
domain: automation | |
input: | |
warning_sensor: | |
selector: | |
entity: | |
domain: sensor | |
mqtt_topic: | |
selector: | |
text: | |
mode: single | |
variables: | |
warning_sensor: !input warning_sensor | |
trigger: | |
- platform: numeric_state | |
entity_id: !input warning_sensor | |
above: 1 | |
action: | |
- alias: Warnungstyp setzen | |
variables: | |
warning: >- | |
{{ state_attr(warning_sensor, "warning_1_type") }} | |
- alias: Icon setzen | |
variables: | |
icon: |- | |
{{ "ww-frost" if warning <= 22 else | |
"ww-thunderstorm" if warning <= 49 else | |
"ww-wind" if warning <= 56 else | |
"ww-fog" if warning <= 59 else | |
"ww-pouring" if warning <= 66 else | |
"ww-snow" if warning <= 76 else | |
"ww-blackice" if warning <= 87 else | |
"ww-thaw" if warning <= 89 else | |
"ww-thunderstorm" if warning <= 96 else | |
"ww-generic" }} | |
- service: script.awtrix_notify | |
metadata: {} | |
data: | |
device: !input mqtt_topic | |
duration: "00:00:05" | |
text: >- | |
{{ state_attr(warning_sensor, "warning_1_name") }} | |
icon: "{{ icon }}" | |
hexcolor: >- | |
{{ state_attr(warning_sensor, "warning_1_color")}} | |
hold: true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment