Code: Alles auswählen
uid: Unwetter Card
tags:
- dwd
- unwetterwarnung
- lenschi.th
props:
parameters:
- context: item
description: Warnung Titel
label: Headline
name: headline
required: true
type: TEXT
- context: item
description: Warnung Type
label: Type
name: type
required: true
type: TEXT
- context: item
description: Warnung Schweregrad
label: Severity
name: severity
required: true
type: TEXT
- context: item
description: Warnung Gültig ab
label: Valid from
name: validFrom
required: false
type: TEXT
- context: item
description: Warnung Gültig bis
label: Valid to
name: validTo
required: false
type: TEXT
- context: item
description: Warnung Beschreibung
label: Description
name: description
required: true
type: TEXT
- context: item
description: Anweisung
label: Instruction
name: validTo
required: false
type: TEXT
parameterGroups: []
timestamp: Nov 12, 2022, 12:02:45 AM
component: f7-card
config:
style:
noShadow: false
border-radius: 5px
box-shadow: 5px 5px 10px 1px rgba(0,0,0,0.1)
class:
- padding: 0px
margin-left: 0px
margin-right: 0px
title: =items[props.headline].state
slots:
content:
- component: oh-list-card
config:
noBorder: true
noShadow: true
outline: true
slots:
default:
- component: oh-list-item
config:
title: =items[props.type].state
icon: '=items[props.severity].displayState === "Leicht" ? "f7:cloud_drizzle_fill" : items[props.severity].displayState === "Mittel" ? "f7:cloud_hail_fill" :items[props.severity].displayState === "Schwer" ? "f7:cloud_bolt_fill" :items[props.severity].displayState === "Extrem" ? "f7:cloud_bolt_rain_fill" : ""'
iconColor: '=items[props.severity].displayState === "Leicht" ? "yellow" : items[props.severity].displayState === "Mittel" ? "violett" :items[props.severity].displayState === "Schwer" ? "orange" :items[props.severity].displayState === "Extrem" ? "red" : "black"'
badgeColor: '=items[props.severity].displayState === "Leicht" ? "yellow" : items[props.severity].displayState === "Mittel" ? "violett" :items[props.severity].displayState === "Schwer" ? "orange" :items[props.severity].displayState === "Extrem" ? "red" : "black"'
badge: =items[props.severity].displayState
- component: oh-label-item
config:
icon: f7:clock
iconColor: red
title: "Gültig ab:"
item: =props.validFrom
- component: oh-label-item
config:
icon: f7:clock_fill
iconColor: green
title: "Gültig bis: "
item: =props.validTo
- component: f7-card
config:
noBorder: false
noShadow: true
outline: false
content: =items[props.description].state
- component: f7-card-footer
slots:
default:
- component: Label
config:
text: =props.anweisung
style:
color: red
text-align: center
font-size: 15px
font-weight: 800
Gruß Lenschi