Hauptmenü

Wetter Widget

Begonnen von draddy, 18 März 2022, 14:17:57

Vorheriges Thema - Nächstes Thema

draddy

hi,

weather ist kein normales Template, das wird durch scripts umgesetzt,

du brauchst nur als appOption im wetter device

{
"template": "weather",
"home": true
}


machen (statt "home": true geht natürlich auch room was auch immer ... ;))

damit sollte schon was da sein.

list ist neu, denke aber auch das wird über Scripts geregelt, da kommt quasi der ganze Code in die appOption (siehe Beispiel von jemu etwas weiter oben) 
OMV5@AsRock j3455 8GB RAM
FHEM@Docker, Shelly "starter pack" 4x PlugS, 2x Bulb Duo RGB, Shelly 2.5, Shelly Plus 1, DoorBird 2103V

jemu75

Zitat von: fettgu am 04 April 2022, 22:32:38
Hallo jemu75

erst einmal vielen Dank für fhemapp.

Zum neuen Release, fehlen auf github nicht die templates für list und weather im ordner cfg?

Viele Grüße
Gudido

Hallo Gudido,

das neue Template list kann beliebig konfiguriert werden. Es ist also nicht explizit für Wetterdaten gedacht. Das war nur der "Auslöser" für die Erstellung dieses Templates. Natürlich kann man jetzt für die verschiedenen Wetter-Schnittstellen, die FHEM bietet Konfigurationen erstellen. Hier setze ich auf die Communitiy und warte mal ab, was hier so entsteht. Wenn gute Lösungen zur Darstellung der Wetterdaten hier gepostet werden, dann stelle ich diese gern in der Doku auf github ein. Hoffe diese Antwort ist erstmal okay für Dich.  ;)

Beste Grüße
Jens.

jemu75

Hier mal ein Beispiel, wie das neue Template list für die Anzeige des Wetters über die FHEM Wetterschnittstelle von proplanta aussehen kann.

Hier die Definition, die unter appOptions in FHEM hinterlegt werden muss:

{
"template": "list",
"setup": {
"iconSet": [
{ "val": "t1.gif", "icon": "mdi-weather-sunny" },
{ "val": "t2.gif", "icon": "mdi-weather-sunny" },
{ "val": "t3.gif", "icon": "mdi-weather-partly-cloudy" },
{ "val": "t4.gif", "icon": "mdi-weather-partly-cloudy" },
{ "val": "t5.gif", "icon": "mdi-weather-cloudy" },
{ "val": "t6.gif", "icon": "mdi-weather-partly-rainy" },
{ "val": "t7.gif", "icon": "mdi-weather-rainy" },
{ "val": "t8.gif", "icon": "mdi-weather-lightning" },
{ "val": "t9.gif", "icon": "mdi-weather-partly-snowy" },
{ "val": "t10.gif", "icon": "mdi-weather-snowy" },
{ "val": "t11.gif", "icon": "mdi-weather-snowy-rainy" },
{ "val": "t12.gif", "icon": "mdi-weather-hazy" },
{ "val": "t13.gif", "icon": "mdi-weather-fog" },
{ "val": "t14.gif", "icon": "mdi-weather-rainy" },
{ "val": "n1.gif", "icon": "mdi-weather-night" },
{ "val": "n2.gif", "icon": "mdi-weather-night" },
{ "val": "n3.gif", "icon": "mdi-weather-night-partly-cloudy" },
{ "val": "n4.gif", "icon": "mdi-weather-night-partly-cloudy" },
{ "val": "n5.gif", "icon": "mdi-weather-cloudy" },
{ "val": "n6.gif", "icon": "mdi-weather-partly-rainy" },
{ "val": "n7.gif", "icon": "mdi-weather-rainy" },
{ "val": "n8.gif", "icon": "mdi-weather-lightning" },
{ "val": "n9.gif", "icon": "mdi-weather-partly-snowy" },
{ "val": "n10.gif", "icon": "mdi-weather-snowy" },
{ "val": "n11.gif", "icon": "mdi-weather-snowy-rainy" },
{ "val": "n12.gif", "icon": "mdi-weather-hazy" },
{ "val": "n13.gif", "icon": "mdi-weather-fog" },
{ "val": "n14.gif", "icon": "mdi-weather-rainy" }
],
"listItems": [
{
"text1": ["weather::%s"]
},
{
"text1": ["pressure::Luftdruck:text"],
"text11": ["pressure::%n.0hPa"],
"text2": ["wind::Wind:text"],
"text21": ["wind::%n.0km/h"],
"divider": true
},
{
"text1": ["fc0_date::Morgens:text"],
"icon1": ["fc0_weatherMorningIcon::%s"],
"text2": ["fc0_date::Mittags:text"],
"icon2": ["fc0_weatherDayIcon::%s"],
"text3": ["fc0_date::Abends:text"],
"icon3": ["fc0_weatherEveningIcon::%s"],
"divider": true
},
{
"class1": "col-2 text-center",
"icon1": ["fc0_weatherDayIcon::%s"],
"class2": "text-left",
"text2": ["fc0_date::%s:font-weight-bold"],
"text21": ["fc0_weatherDay::%s:text"],
"class5": "col-2 text-center",
"text5": ["fc0_tempMax::%n.0°C:text"],
"text51": ["fc0_tempMin::%n.0°C:text"]
},
{
"class1": "col-2 text-center",
"icon1": ["fc1_weatherDayIcon::%s"],
"class2": "text-left",
"text2": ["fc1_date::%s:font-weight-bold"],
"text21": ["fc1_weatherDay::%s:text"],
"class5": "col-2 text-center",
"text5": ["fc1_tempMax::%n.0°C:text"],
"text51": ["fc1_tempMin::%n.0°C:text"]
},
{
"class1": "col-2 text-center",
"icon1": ["fc2_weatherDayIcon::%s"],
"class2": "text-left",
"text2": ["fc2_date::%s:font-weight-bold"],
"text21": ["fc2_weatherDay::%s:text"],
"class5": "col-2 text-center",
"text5": ["fc2_tempMax::%n.0°C:text"],
"text51": ["fc2_tempMin::%n.0°C:text"]
},
{
"class1": "col-2 text-center",
"icon1": ["fc3_weatherDayIcon::%s"],
"class2": "text-left",
"text2": ["fc3_date::%s:font-weight-bold"],
"text21": ["fc3_weatherDay::%s:text"],
"class5": "col-2 text-center",
"text5": ["fc3_tempMax::%n.0°C:text"],
"text51": ["fc3_tempMin::%n.0°C:text"]
},
{
"class1": "col-2 text-center",
"icon1": ["fc4_weatherDayIcon::%s"],
"class2": "text-left",
"text2": ["fc4_date::%s:font-weight-bold"],
"text21": ["fc4_weatherDay::%s:text"],
"class5": "col-2 text-center",
"text5": ["fc4_tempMax::%n.0°C:text"],
"text51": ["fc4_tempMin::%n.0°C:text"]
}
],
"info": {
"left1": ["weatherIcon:::%s"],
"mid1": ["Readings.state.Time::%t"],
"right2": ["state:Tmin::mdi-sync", "state:::mdi-sync-off"]
}
}
}


Im Anhang ein Bild, wie das Template damit aussieht.

draddy

moin Jens,
muss da gleich mal bissl anfangen zu basteln und testen ... ;)

könnte man mit dem list auch Template vorlagen bauen?

dann könnte Wolle ja z.B. mal wegen DWD (wars glaub ich) schauen und man nimmt die Fertigen vorlagen einfach als Sammlung auf.

oder kann list explizit nur in appOptions genutzt werden? ;)
OMV5@AsRock j3455 8GB RAM
FHEM@Docker, Shelly "starter pack" 4x PlugS, 2x Bulb Duo RGB, Shelly 2.5, Shelly Plus 1, DoorBird 2103V

jemu75

Natürlich könnt ihr Vorlagen erstellen. Diese müssten dann nur in appOptions kopiert werden.  :)

draddy

ok, aber die üblichen templ_ Dateien funktionieren halt nicht damit? ;)
OMV5@AsRock j3455 8GB RAM
FHEM@Docker, Shelly "starter pack" 4x PlugS, 2x Bulb Duo RGB, Shelly 2.5, Shelly Plus 1, DoorBird 2103V

draddy

hi Jens,

kannst du eventuell mal ne komplette Liste bereitstellen, was in List alles möglich ist, besonders bezogen auf Text.

also
"text":["reading:wert:anzeigetext"] großer  dicken Text
"text":["reading:wert:anzeigetext:text"]  normaler Text
"text":["reading:wert:anzeigetext:font-weight-bold"] dicker Text normale Größe

gibt es mehr? z.B. size?

zu "class"
habe ich das bis jetzt richtig überblickt, es gibt 5 spalten die ich besetzen kann, die interne col ist aber wie in fhemAPP allgemein 12?

sprich: wenn ich ein col span über die ganze breite des Templates will, mache ich col-12 - richtig?
gibt es hier weitere Optionen neben;

  • text-center
  • text-right
  • text-left

"icon" - gibt es hier eventuell size? color?


quasi, alles was wissenswert wäre mal zusammenfassen ;)

dankö
Jens
OMV5@AsRock j3455 8GB RAM
FHEM@Docker, Shelly "starter pack" 4x PlugS, 2x Bulb Duo RGB, Shelly 2.5, Shelly Plus 1, DoorBird 2103V

seven24

Hallo,

bei mit funktioniert das template list bei WetterProplanta nicht, aber dafür das template weather appOptions { "template": "weather" }
Leider finde ich für weather keine templ_weather.json Datei, da ich gern das Template anpassen möchte.

Ich bin zwar erst seit zwei Tagen dabei, aber die FHEMapp ist KLASSE!

VG Sven