• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

MMM-Jeedom

Scheduled Pinned Locked Moved Unsolved Requests
20 Posts 4 Posters 4.6k Views 4 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    ELMAGO
    last edited by Dec 6, 2019, 12:29 PM

    Hello

    I use this plugin to get information on my Jeedom.
    I would like following the answer to change the font.

    For example in this query, if the answer is “green” then the font will be green.

    0_1575635213382_d8d5f012-1080-4d48-b3a9-9d0574b106aa-image.png

    Dans cette autre exemple, si le trajet est supérieur à 18 alors la police sera rouge et gras.

    0_1575635371208_310ffd14-ec58-4ed1-acdb-1bb071af1373-image.png

    Merci pour votre aide

    1 Reply Last reply Reply Quote 0
    • E Offline
      ELMAGO
      last edited by Dec 12, 2019, 9:34 AM

      How can I help?

      S 1 Reply Last reply Dec 12, 2019, 11:22 AM Reply Quote 0
      • S Away
        sdetweil @ELMAGO
        last edited by sdetweil Dec 13, 2019, 6:36 PM Dec 12, 2019, 11:22 AM

        @ELMAGO the module does not provide any special class names that you can override in custom.css.

        this is the only section of the module that does classnames
        creates a row (tr)

        le module ne fournit aucun nom de classe spécial que vous pouvez remplacer dans custom.css.

        c’est la seule section du module qui fait des noms de classe
        crée une ligne (tr)

        			var sensorWrapper = document.createElement("tr"); //on créé la liste principale, qu'on va remplir après
        			----> sensorWrapper.className = "normal";  <----
        
        			//on commence par afficher le symbole, selon tous les cas possible : symbol; symbolon, symboloff, ...
        			var symbolTD = document.createElement('td');
        			-----> symbolTD.className = "symbol align-left"; < -----
        			var symbol = document.createElement('i');
        			var symbolClass = sensor.symboloff;
        			if(sensor.boolean && sensor.status==1) symbolClass = sensor.symbolon;
        
        		        ----> if(typeof sensor.boolean== 'undefined') symbolClass = sensor.symbol;
        			symbol.className = symbolClass; < -----
        			symbolTD.appendChild(symbol);
        			sensorWrapper.appendChild(symbolTD); //et on ajoute le symbole au Wrapper
        

        symbol and whatever the sensor.symbol turns out to be (which is taken directly from the api response data)

        u might be able to change the font/color for the class ‘normal’

        in custom.css

        .MMM-Jeedom .tr .normal {
        color: red;
        }

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        E 1 Reply Last reply Dec 13, 2019, 7:56 AM Reply Quote 0
        • E Offline
          ELMAGO @sdetweil
          last edited by Dec 13, 2019, 7:56 AM

          @sdetweil

          Hello

          thank you for your answer, I have the impression that you speak French, I’m wrong?

          What you have provided me is a change of symbol if I understand well, how to do for the color of the font?

          Thanks in advance.

          S 1 Reply Last reply Dec 13, 2019, 6:30 PM Reply Quote 0
          • S Away
            sdetweil @ELMAGO
            last edited by Dec 13, 2019, 6:30 PM

            @ELMAGO i can read some french, I will use an online conversion tool to translate long text and sometimes my responses

            je peux lire du français, j’utiliserai un outil de conversion en ligne pour traduire des textes longs et parfois mes réponses

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            E 1 Reply Last reply Dec 13, 2019, 7:14 PM Reply Quote 0
            • E Offline
              ELMAGO @sdetweil
              last edited by Dec 13, 2019, 7:14 PM

              @sdetweil

              okay so i would make the effort, no problem, can answer my previous question?

              E 1 Reply Last reply Dec 13, 2019, 7:16 PM Reply Quote 0
              • E Offline
                ELMAGO @ELMAGO
                last edited by Dec 13, 2019, 7:16 PM

                @ELMAGO said in MMM-Jeedom:

                @sdetweil

                okay so i would make the effort, no problem, can answer my previous question?

                Exemple :

                			{
                				idx: "77", 
                				customTitle: "Batterie Etage : ",
                				unit : "%",
                								},
                

                if the result is greater than 50 then I would like it to be in green

                S 1 Reply Last reply Dec 13, 2019, 7:17 PM Reply Quote 0
                • S Away
                  sdetweil @ELMAGO
                  last edited by Dec 13, 2019, 7:17 PM

                  @ELMAGO see my prior response

                  le module ne fournit aucun nom de classe spécial que vous pouvez remplacer dans custom.css.

                  c’est la seule section du module qui fait des noms de classe
                  crée une ligne (tr)

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  E 1 Reply Last reply Dec 13, 2019, 7:20 PM Reply Quote 0
                  • E Offline
                    ELMAGO @sdetweil
                    last edited by Dec 13, 2019, 7:20 PM

                    @sdetweil

                    I’m sorry, I understood correctly for the css part, but not for the module itself.

                    Could you give me this concrete example?

                    S 1 Reply Last reply Dec 13, 2019, 7:28 PM Reply Quote 0
                    • S Away
                      sdetweil @ELMAGO
                      last edited by Dec 13, 2019, 7:28 PM

                      @ELMAGO i’m not sure I understand the comment, but i’ll try…

                      when the module generates content for the screen, each little piece can have different classes assigned.
                      those classes can be used in the custom.css to manipulate the presentation of that segment.

                      the cod in this modules does

                      create tablerow (tr)
                      assign class = ‘normal’ to everything in the row

                      then it looks at the sensor data

                      			if(sensor.boolean && sensor.status==1) symbolClass = sensor.symbolon;
                      
                      		        ----> if(typeof sensor.boolean== 'undefined') symbolClass = sensor.symbol;
                      			symbol.className = symbolClass; 
                      

                      and assigns a value to the (symbol is the icon )
                      symbol.className

                      and that is all

                      so u have a class for the symbol
                      and a class for the row.

                      I think u want a class for the VALUE on the row but that was not supplied

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

                      E 1 Reply Last reply Dec 13, 2019, 7:35 PM Reply Quote 0
                      • 1
                      • 2
                      • 1 / 2
                      1 / 2
                      • First post
                        7/20
                        Last post
                      Enjoying MagicMirror? Please consider a donation!
                      MagicMirror created by Michael Teeuw.
                      Forum managed by Sam, technical setup by Karsten.
                      This forum is using NodeBB as its core | Contributors
                      Contact | Privacy Policy