FHEM Forum

FHEM => Frontends => TabletUI => Thema gestartet von: bjoernbo am 13 Februar 2016, 13:40:33

Titel: Label > Farbe ändern bei bestimmten Wert
Beitrag von: bjoernbo am 13 Februar 2016, 13:40:33
Kann man innerhalb eines Labels dieses so einstellen, dass bei erreichen eines Status die Farbe des Wertes geändert wird. In meinem Beispiel, soll der Wert "low" in rot angezeigt werden.
Beim Widget Symbol geht das ja:
  <div data-type="symbol" data-subtype="BIOWETTER" data-device="BIOWETTER" data-get="Koliken"
                    data-icons='["font1-angry","font1-sad","font1-smile","font1-happy"]'
                        data-get-on='["sehr stark","stark","schwach","keine"]'
                        data-on-colors='["red","orange","yellowgreen","green"]'
                        style="font-size:4em"
                        class="inline"></div>

(//)
Titel: Antw:Label > Farbe ändern bei bestimmten Wert
Beitrag von: setstate am 13 Februar 2016, 13:55:57
ja geht, siehe hier: https://github.com/knowthelist/fhem-tablet-ui#label
Titel: Antw:Label > Farbe ändern bei bestimmten Wert
Beitrag von: rasti am 13 Februar 2016, 15:52:44

Hier etwas Code - Homematic (allerdings Labelwerte die hier gefärbt werden)

Screenshot hier:   http://forum.fhem.de/index.php?action=dlattach;topic=43632.0;attach=46411;image

Gruss

Ralf



<li data-row="1" data-col="2" data-sizex="3" data-sizey="1" class="semitransparent">
      <header>Heizung</header><br>
      <div class="top-space inline"><div data-type="label" data-device="HM_2E4CE0_Clima" data-get="measured-temp" style="font-size: 200%"
        data-limits="[10,18,23]" data-colors='["#0000ff","#00ff00","#ff0000"]'
        data-unit="&deg; C"></div>
      <div data-type="label" class="cell">Daniel</div>
      </div>

     <div class="top-space inline">       
    <div data-type="label" data-device="HM_224A2E_Clima" data-get="measured-temp" style="font-size: 200%"
data-limits="[10,18,23]" data-colors='["#0000ff","#00ff00","#ff0000"]'
          data-unit="&deg; C"></div>     <div data-type="label" class="cell">Ralf</div>
     </div>

     <div class="top-space inline">
    <div data-type="label" data-device="HM_304E63_Clima" data-get="measured-temp" style="font-size: 200%"
   data-limits="[10,18,23]" data-colors='["#0000ff","#00ff00","#ff0000"]'
               data-unit="&deg; C"></div>     <div data-type="label" class="cell">Schlafzimmer</div>
      </div>

  <div class="top-space inline">
    <div data-type="label" data-device="HM_3C4D66_Clima" data-get="measured-temp" style="font-size: 200%"
      data-limits="[10,18,23]" data-colors='["#0000ff","#00ff00","#ff0000"]'
        data-unit="&deg; C"></div>     <div data-type="label" class="cell">Bad</div>
      </div>

</li>


Titel: Antw:Label > Farbe ändern bei bestimmten Wert
Beitrag von: bjoernbo am 13 Februar 2016, 16:31:11
Vielen Dank!


...
data-colors='["red","green"]'
data-limits='["low","ok"]'