Giter VIP home page Giter VIP logo

Comments (15)

vdomos avatar vdomos commented on August 19, 2024

Not sure a datatype is necessary.
The value is only use for the widget.

There is 2 sensors boolean for use in scenario.

from domogik-plugin-rainhour.

tikismoke avatar tikismoke commented on August 19, 2024

But to display in sensor widget in client seems better to see value instead of numbers.

Le 8 octobre 2016 18:01:04 GMT+02:00, vdomos [email protected] a écrit :

Not sure a datatype is necessary.
The value is only use for the widget.

There is 2 sensors boolean for use in scenario.

You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
#1 (comment)

Envoyé de mon appareil Android avec K-9 Mail. Veuillez excuser ma brièveté.

from domogik-plugin-rainhour.

vdomos avatar vdomos commented on August 19, 2024

In domoweb, I use weather icon (one value = one icon), not possible in domodroid ?

from domogik-plugin-rainhour.

vdomos avatar vdomos commented on August 19, 2024

but tell me how you want how i can do for Domodroid.

from domogik-plugin-rainhour.

tikismoke avatar tikismoke commented on August 19, 2024

Ok do not thought of weather icons :(

Going to have a look at value/icon you selected in domoweb and apply it to domodroid for those sensors type.

Easier indeed, but it needs more works on my part :(

Le 8 octobre 2016 18:04:15 GMT+02:00, vdomos [email protected] a écrit :

In domoweb, I use weather icon (one value = one icon), not possible in
domodroid ?

You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
#1 (comment)

Envoyé de mon appareil Android avec K-9 Mail. Veuillez excuser ma brièveté.

from domogik-plugin-rainhour.

vdomos avatar vdomos commented on August 19, 2024

Dis moi comment tu voudrais voir les infos.
Toute idée est bonne à prendre.

from domogik-plugin-rainhour.

tikismoke avatar tikismoke commented on August 19, 2024

Ben a voir avec Fritz mais pourquoi pas créer un datatype dt_Weather_icon est on renvoie le code de l'icône que l'on souhaite. Ça veut dire qu'il faut aussi l'appliquer au plugin weather de base et modifier tous les widgets de domoweb et domodroid.

Dans weather le code que l'on reçoit correspond directement à une icône wi_(valeur). Avoir ce qui est plus simple.

Le dt_type aurait l'avantage d'être plus générique.
Le bon code de l'icône c'est déjà pas mal.
La conversion à la main ça fait encore une nouvelle exception à gérer :(

from domogik-plugin-rainhour.

tikismoke avatar tikismoke commented on August 19, 2024

Par exemple si tu renvoie "rain" au lieu de 1 on pourrait lire directement "wi-rain"

from domogik-plugin-rainhour.

vdomos avatar vdomos commented on August 19, 2024

J'ai fait en fonction de ce que me renvoie l'API Meteo France (code 0..4) et j'ai copié sur le widget weather de Fritz pour afficher les icones comme il le fait avec le "condition_code" renvoyé par Yahoo.

Mais, je comprends mieux ton point de vue. il faudrai uniformiser pour les différents clients.

A voir pour des datatypes dédiés weather

from domogik-plugin-rainhour.

tikismoke avatar tikismoke commented on August 19, 2024

Oui dans un premier temps je vais ajouter l'exception.
À termes faut faire mieux mais en harmonisant ;) faut en rediscuter avec tout le monde, chacun pouvant avoir une meilleure idée.

Je sais pas ce que tu en pense mais le datatype dt_wi_icon me paraît pas mal, on affiche ce que le développeur du plugin voudrait voir et ce quelque soit le client.

En plus ça me donne une idée avec aussi un datatype fontawesome pour le même principe. Je sais pas dans quel plugin il pourrait être utile mais côté client ça serait plus facile.
Notify @fritz_smh @Cereal2nd

Le 8 octobre 2016 18:38:08 GMT+02:00, vdomos [email protected] a écrit :

J'ai fait en fonction de ce que me renvoie l'API Meteo France (code
0..4) et j'ai copié sur le widget weather de Fritz pour afficher les
icones comme il le fait avec le "condition_code" renvoyé par Yahoo.

Mais, je comprends mieux ton point de vue. il faudrai uniformiser pour
les différents clients.

A voir pour des datatypes dédiés weather

You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
#1 (comment)

Envoyé de mon appareil Android avec K-9 Mail. Veuillez excuser ma brièveté.

from domogik-plugin-rainhour.

vdomos avatar vdomos commented on August 19, 2024

qu'est ce que tu appelles exceptions ?
un test en fonction du code ?

from domogik-plugin-rainhour.

tikismoke avatar tikismoke commented on August 19, 2024

Je push et tu verras ;)

Le 8 octobre 2016 18:48:46 GMT+02:00, vdomos [email protected] a écrit :

qu'est ce que tu appelles exceptions ?
un test en fonction du code ?

You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
#1 (comment)

Envoyé de mon appareil Android avec K-9 Mail. Veuillez excuser ma brièveté.

from domogik-plugin-rainhour.

tikismoke avatar tikismoke commented on August 19, 2024

Voilà l'exception à gérer :)
domogik/domodroid@355c0eb#diff-bad5aae7b3e59601ea87f56819d36587R197

D'habitude j’appelle la méthode par un entier qui correspond directement au code de l’icône a afficher de cette manière:

value = context.getString(Graphics_Manager.Names_conditioncodes(getContext(), Integer.parseInt(featureMap.getCurrentState())));

Méthode qui ressemble tout simplement à ça:

public static int Names_conditioncodes(Context context, int code) {
        //used to get the translate text from yahoo weather infocode.
        try {
            //wi_yahoo_
            return context.getResources().getIdentifier("wi_yahoo_" + code, "string", context.getPackageName());
            //return context.getResources().getIdentifier("info" + code, "string", context.getPackageName());
        } catch (Exception e) {
            return R.string.info48;
        }
    }

Ceci dit c'est réglé ça fonctionne, mais c'est pas 'catholique' le jour ou quelqu'un crée un sensor nommé "rainlevelxxx" dans un plugin, ça va chercher a exécuter cette routine.

https://snag.gy/CLTsmf.jpg

from domogik-plugin-rainhour.

vdomos avatar vdomos commented on August 19, 2024

En fait pour simplifier le code, il faudrai que je remplace les codes "0 à 5" par les mêmes codes correspondant aux conditions_codes de Yahoo ?
Je n'avais pas compris que tu utlisais les memes icones

from domogik-plugin-rainhour.

tikismoke avatar tikismoke commented on August 19, 2024

Par exemple oui en calquant sur l'équivalent yahoo weather.

Ça simplifierait le code de mon côté.
Mais ça change rien côté domoweb d'où l'idée des dt_police_de_caractère.

from domogik-plugin-rainhour.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.