ich habe hier openhab 4.2.2 auf einem raspi 400 installiert
habe hier mal was gefungen ( muell kalender )
diesen habe ich mit auch mit voller funktion eingebaut, und meinte diesen auch noch etwas zuerweitern.
dies klappt ( so wie ich es mir vorgestellt habe ) leider nur bedingt.
ich habe mit dem widget in summe 3 probleme / fragen.
- warum wird der tag "Morgen" als "undefieniert" angezeigt ( was habe ich da vergessen ). ??
- wenn ich beim bereich Birthday bin, kann ich das datum einblenden ( geht auch ), aber wie kann ich hier den bereich titel ( OHNE "Birthday" ) mit einblenden ??
anzeige ist, "25.11.2024 heute " , soll sein " Balu der Baer 25.11.2024 heute "
- ist es moeglich hier 3 eintrage zu machen ( es gibt tage da haben 3 leute geburstag ), glaube aber das geht nicht ( da nur ein wert geliefert wird ), bin mir aber nicht sicher
screenshots und widget code sind anbei
Code: Alles auswählen
uid: Test_Muellabfuhr_Birthday_Allgemein_1
tags: []
props:
parameters:
- description: https://openhabforum.de/viewtopic.php?t=7519&start=10,
Hintergrundfarbe veränderbar, z.B. "transparent" default
"linear-gradient(to top left,#B0E0E6 20%,#1E90FF 30%,#FFC0CB 60%)"
label: Hintergrundfarbe
name: background1
required: false
type: TEXT
- default: "0"
description: Abstand vom oberen Rand veränden (in Pixel - z.B. 30)
label: Abstand nach oben
name: marginTop
required: false
type: TEXT
- default: "28"
description: Schriftgrösse für Überschrift veränden (in Pixel - z.B. 30)
label: Schriftgrösse Überschrift
name: fontSizeHeadline
required: false
type: TEXT
- default: "20"
description: Schriftgrösse für Zeilen (in Pixel - z.B. 30 - default ist 20)
label: Schriftgrösse Zeilen
name: fontSizeContent
required: false
type: TEXT
- default: "0"
description: Zeilenabstand (in Pixel - z.B. 30 default ist 0 )
label: Zeilenabstand
name: lineFeed
required: false
type: TEXT
timestamp: Nov 25, 2024, 12:41:44 AM
component: f7-card
config:
class:
- display-flex
- flex-direction-column
- align-items-center
style:
--f7-card-expandable-header-font-size: 30px
background: '=(props.background1) ? props.background1 : "linear-gradient(to top
left,#B0E0E6 20%,#1E90FF 30%,#FFC0CB 60%)"'
border-radius: var(--f7-card-expandable-border-radius)
fontSize: var(--f7-card-expandable-header-font-size)
height: auto
margin-top: =props.marginTop + "px"
width: auto
slots:
content:
- component: f7-card-header
config:
style:
color: cyan
font-size: =props.fontSizeHeadline +"px"
justify-content: flex-end
margin-top: 1px
min-height: 30px
padding: 20px
margin-bottom: =props.lineFeed +"px"
slots:
default:
- component: Label
config:
style:
left: 0px
margin-top: 20px
margin-bottom: 20px
margin-left: 60px
position: absolute
text: ="BSR / ALBA Termine"
- component: f7-card-content
slots:
default:
- component: f7-list
config:
mediaList: true
slots:
default:
- component: oh-list-item
config:
badge: '=(((dayjs(items.Kalender_Schwarze_Tonne_Start.state).diff(dayjs(items.ZeitAktuell_DateTime.state).startOf("day")))/1000/86400)
== 1 ? "Morgen" :
((dayjs(items.Kalender_Schwarze_Tonne_Start.state).diff(dayjs(items.ZeitAktuell_DateTime.state).startOf("day")))/1000/86400)
== 0 ? "Heute" : false)'
badgeColor: ="red"
icon: f7:trash
iconColor: black
style:
color: black
font-size: =props.fontSizeContent + "px"
margin-bottom: =props.lineFeed +"px"
title: ="Schwarze Tonne " + items.Kalender_Schwarze_Tonne_Start.displayState
- component: oh-list-item
config:
badge: '=(((dayjs(items.Kalender_Braune_Tonne_Start.state).diff(dayjs(items.ZeitAktuell_DateTime.state).startOf("day")))/1000/86400)
== 1 ? "Morgen" :
((dayjs(items.Kalender_Braune_Tonne_Start.state).diff(dayjs(items.ZeitAktuell_DateTime.state).startOf("day")))/1000/86400)
== 0 ? "Heute" : false)'
badgeColor: ="red"
icon: f7:trash
iconColor: green
style:
color: green
font-size: =props.fontSizeContent + "px"
margin-bottom: =props.lineFeed +"px"
title: ="Bio Tonne " + items.Kalender_Braune_Tonne_Start.displayState
- component: oh-list-item
config:
badge: '=(((dayjs(items.Kalender_Blaue_Tonne_Start.state).diff(dayjs(items.ZeitAktuell_DateTime.state).startOf("day")))/1000/86400)
== 1 ? "Morgen" :
((dayjs(items.Kalender_Blaue_Tonne_Start.state).diff(dayjs(items.ZeitAktuell_DateTime.state).startOf("day")))/1000/86400)
== 0 ? "Heute" : false)'
badgeColor: ="red"
icon: f7:trash
iconColor: blue
style:
color: blue
font-size: =props.fontSizeContent + "px"
margin-bottom: =props.lineFeed +"px"
title: ="Papier Tonne " + items.Kalender_Blaue_Tonne_Start.displayState
- component: oh-list-item
config:
badge: '=(((dayjs(itemsKalender_Gelbe_Tonne_Start.state).diff(dayjs(items.ZeitAktuell_DateTime.state).startOf("day")))/1000/86400)
== 1 ? "Morgen" :
((dayjs(items.Kalender_Gelbe_Tonne_Start.state).diff(dayjs(items.ZeitAktuell_DateTime.state).startOf("day")))/1000/86400)
== 0 ? "Heute" : false)'
badgeColor: ="red"
icon: f7:trash
iconColor: yellow
style:
color: yellow
font-size: =props.fontSizeContent + "px"
margin-bottom: =props.lineFeed +"px"
title: ="Gelbe Tonne " + items.Kalender_Gelbe_Tonne_Start.displayState
- component: f7-card-header
config:
style:
color: cyan
font-size: =props.fontSizeHeadline +"px"
justify-content: flex-end
margin-top: 1px
min-height: 30px
padding: 20px
margin-bottom: =props.lineFeed +"px"
slots:
default:
- component: Label
config:
style:
left: 0px
margin-top: 20px
margin-bottom: 20px
margin-left: 60px
position: absolute
text: ="Birthday Termine"
- component: f7-card-content
slots:
default:
- component: f7-list
config:
mediaList: true
slots:
default:
- component: oh-list-item
config:
badge: '=(((dayjs(items.Kalender_Birthday_Start.state).diff(dayjs(items.ZeitAktuell_DateTime.state).startOf("day")))/1000/86400)
== 1 ? "Morgen" :
((dayjs(items.Kalender_Birthday_Start.state).diff(dayjs(items.ZeitAktuell_DateTime.state).startOf("day")))/1000/86400)
== 0 ? "Heute" : false)'
badgeColor: ="red"
icon: f7:burst
iconColor: red
style:
color: black
font-size: =props.fontSizeContent + "px"
margin-bottom: =props.lineFeed +"px"
title: =" " + items.Kalender_Birthday_Start.displayState
- component: f7-card-header
config:
style:
color: cyan
font-size: =props.fontSizeHeadline +"px"
justify-content: flex-end
margin-top: 1px
min-height: 30px
padding: 20px
margin-bottom: =props.lineFeed +"px"
slots:
default:
- component: Label
config:
style:
left: 0px
margin-top: 20px
margin-bottom: 20px
margin-left: 60px
position: absolute
text: ="Allgemeine Termine"
- component: f7-card-content
slots:
default:
- component: f7-list
config:
mediaList: true
slots:
default:
- component: oh-list-item
config:
badge: '=(((dayjs(items.Kalender_Allgemein_Start.state).diff(dayjs(items.ZeitAktuell_DateTime.state).startOf("day")))/1000/86400)
== 1 ? "Morgen" :
((dayjs(items.Kalender_Allgemein_Start.state).diff(dayjs(items.ZeitAktuell_DateTime.state).startOf("day")))/1000/86400)
== 0 ? "Heute" : false)'
badgeColor: ="red"
icon: f7:pin_fill
iconColor: gray
style:
color: black
font-size: =props.fontSizeContent + "px"
margin-bottom: =props.lineFeed +"px"
title: =" " + items.Kalender_Allgemein_Start.displayState
Balu