[Sammlung]Wetter mit List-Template

Begonnen von draddy, 06 April 2022, 19:24:40

Vorheriges Thema - Nächstes Thema

draddy

Moin,

dachte mir, jeder der sich was bastelt, will vll. anderen das leben etwas leichter machen ;)

Hier meine Version für PROPLANTA.

Eingeklappt Standard Höhe wie Schalter etc. mit Aktuellem Wetterzustand (heiter, wolkig, sonnig ....) und aktueller Temperatur.
Vorlage war jemu's Beispiel ;)

Ausgeklappt Zusätzlich Luftdruck, Wind und Windrichtung (Userreading erforderlich) sowei Luftfeuchtigkeit.
Darunter Tagestrend mit Temperatur und Regenwahrscheinlichkeit, und die Vorhersage für die NÄCHSTEN 5 Tage, somit hat man mit dem Aktuellen Tag also 6 Tage "im blick"

appOptions

{
"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": [
{
"class1": "col-7 text-center",
"text1": ["weather::%s"],
"class2": "col-5",
"text21": ["temperature::Temperatur::text"],
"text22": ["temperature::%n.0°C:text"]

},
{
"text1": ["pressure::Luftdruck:text"],
"text11": ["pressure::%n.0hPa"],
"text2": ["windDirName::Wind aus %s:text"],
"text21": ["wind::%n.0km/h"],
"text3": ["humidity::Luftfeucht.:text"],
"text31": ["humidity::%n%"],
"divider": true
},
{

"text1": ["fc0_date::Morgens:text"],
"icon1": ["fc0_weatherMorningIcon::%s"],
"text11": ["fc0_temp06::Temp: %n°C:text"],
"text12": ["fc0_chOfRain06::Regen: %n%:text"],
"text2": ["fc0_date::Mittags:text"],
"icon2": ["fc0_weatherDayIcon::%s"],
"text21": ["fc0_temp12::Temp: %n°C:text"],
"text22": ["fc0_chOfRain12::Regen: %n%:text"],
"text3": ["fc0_date::Abends:text"],
"icon3": ["fc0_weatherEveningIcon::%s"],
"text31": ["fc0_temp18::Temp: %n°C:text"],
"text32": ["fc0_chOfRain18::Regen: %n%:text"],
"divider": true
},
{
"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"]
},
{
"class1": "col-2 text-center",
"icon1": ["fc5_weatherDayIcon::%s"],
"class2": "text-left",
"text2": ["fc5_date::%s:font-weight-bold"],
"text21": ["fc5_weatherDay::%s:text"],
"class5": "col-2 text-center",
"text5": ["fc5_tempMax::%n.0°C:text"],
"text51": ["fc5_tempMin::%n.0°C:text"]
}
],
"info": {
"left1": ["weatherIcon:::%s"],
"mid1": ["Readings.state.Time::%t"],
"right2": ["state:Tmin::mdi-sync", "state:::mdi-sync-off"]
}
}
}


userReading für Windrichtung

windDirName { ReadingsNum($name,"windDir","") < 10 ? "N" : (ReadingsNum($name,"windDir","") < 35 ? "NNO" : (ReadingsNum($name,"windDir","") < 55 ? "NO" : (ReadingsNum($name,"windDir","") < 80 ? "ONO" : (ReadingsNum($name,"windDir","") < 100 ? "O" : (ReadingsNum($name,"windDir","") < 120 ? "OSO" : (ReadingsNum($name,"windDir","") < 145 ? "SO" : (ReadingsNum($name,"windDir","") < 170 ? "SSO" : (ReadingsNum($name,"windDir","") < 190 ? "S" : (ReadingsNum($name,"windDir","") < 210 ? "SSW" : (ReadingsNum($name,"windDir","") < 235 ? "SW" : (ReadingsNum($name,"windDir","") < 260 ? "WSW" : (ReadingsNum($name,"windDir","") < 280 ? "W" : (ReadingsNum($name,"windDir","") < 300 ? "WNW" : (ReadingsNum($name,"windDir","") < 325 ? "NW" : (ReadingsNum($name,"windDir","") < 350 ? "NNW" : "N")))))))))))))))}


Gruss
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

floerke

Sehr schöne Erweiterung des Standard-Templates!

Danke Dir für die Veröffentlichung, viele Grüße

Marian

grappa24

Danke Jens für die tolle Umsetzung, hat mir sehr viel Arbeit erspart!
Gruß, grappa24 / Dieter
FHEM 6.1, 2 x RasPi 3B+, Debian Buster; KNX, FS20, HM, HUE, Tradfri, Shellies, KLF200
Rollo-/Lichtsteuerung/-szenarien, T-Sensoren, Fensterkontakte, Heizungssteuerung, HEOS, Sprachsteuerung mit Alexa-FHEM, Netatmo, Nuki, ...