Aller au contenu

VD avec icône sur app ?


Nico

Messages recommandés

Voir ici : https://forum.fibaro.com/index.php?/topic/23955-vd-weather-state-v20b-scenevd-netatmo-weather-station-v20/

C'est plutôt sympa du coup comme présentation au niveau des app android, je n'avais jamais fait attention qu'on pouvait mettre ce genre d'affichage.

Lien vers le commentaire
Partager sur d’autres sites

Hello

  • VD is using emojis to show summary of measurements for temperature, humidity, wind speed, etc. They show properly on most Mac OS X, macOS, iOS, Android and Windows 7, but they look just ugly on Windows 10. Why Microsoft introduced those ugly mono-color emojis on their last OS only they know. I tried to find solution but I didn't succeed. In code emojis are represented with UTF codes like '\240\159\140\161' for temperature. If you want you can replace this codes with letters. For example for temperature instead of '\240\159\140\161' you can change to 'T', but you must leave single quotes

Pour les non anglophones : VD utilise des emojis. Dans le code, ils sont représentés par des codes UTF comme '\240\159\140\161' pour la température. On peut remplacer ces codes par 'T' si on veut

 

Dans le vd : 

 

local sy = {temp='\240\159\140\161', humid='\240\159\146\167', noise='\240\159\148\138',
            co2='\240\159\164\162', rainfall='\226\152\148\239\184\143',
            closed_umbrella = '\240\159\140\130', umbrella = '\226\152\130\239\184\143',
            wind='\240\159\140\172', gust='\240\159\146\168', dir='\240\159\140\144',
            skull='\226\152\160\239\184\143️', tts='\240\159\151\163',
            sun='\226\152\128\239\184\143', rain='\240\159\140\167',
            cloud='\226\152\129\239\184\143️', snow='\226\155\132\239\184\143️',
            heat='\240\159\140\158', cool='\226\157\132\239\184\143️',
            flag='\240\159\154\169', sep='\226\142\170', arrowup='\226\134\145',
            arrowdn='\226\134\147'}

 

Plus loin :

 

 fibaro:call(thisdevice, "setProperty", "ui.Label1.value", 
              sy.temp..string.format('%.1f', wT.openmap[stationNo].temp)..wT.openmap[stationNo].temp_unit..
              sy.sep..sy.humid..wT.openmap[stationNo].humid.."%"..
              sy.sep..sy.wind..wT.openmap[stationNo].wind..wT.openmap[stationNo].wind_unit)

 

C'est beau sa programmation. Ca me manque, mais j'ai plus le temps du tout pour l'instant. 

 

Modifié par Bono2007
  • Upvote 1
Lien vers le commentaire
Partager sur d’autres sites

×
×
  • Créer...