Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


Recommended Posts

Posted

Hello,

How to simply change de fontsize of a label in a quick app?

Thanks.

 

function QuickApp:knop2()
    self:debug("binary switch turned on")
    self:updateProperty("value", true)
    hub.setGlobalVariable('mailsender', '256')
    label1 = fibaro.getGlobalVariable("mailsender")
    self: updateView ("label1", "text", label1)
  end
Posted

Label presented in QiuckApp is simple text, but if you would like to change it you can use HTML markup and use eg. font, color, size and others

  • Topic Author
  • Posted

    Thanks Tomasz, I didn't know that. Go test it out.

    Posted

    Can you give an example please ?

    Posted

    Hello @Lode ,

     

    Here is example of printing Sonos zone name in bold text and double size:

    Please login or register to see this code.

     

    You can also define color. Here is example with green colored ✔︎ OK and red colored ✘︎ Error printed on status label:

    Please login or register to see this code.

     

    You can also show album art on the label using following code:

    Please login or register to see this code.

     

    Hope this helps :-)

     

    • Like 4
    • Thanks 1
    Posted

    @Sankotronic thank you so much !!!

    Posted

    This is great to know. Can you point me to any information regarding the UI for Fibaro devices? Specifically I would like to examine or change the information being displayed by a thermostat QuickAppChild device and the accompanying temperature device.

     

    Thank you

  • Topic Author
  • Posted

     

    @Sankotronic thanks,
    I had already searched myself, but I typed the html code before the self:updateview.
    I'm going to test these examples.

    Posted
    On 1/27/2023 at 9:39 AM, Sankotronic said:

    Hello @Lode ,

     

    Here is example of printing Sonos zone name in bold text and double size:

    Please login or register to see this code.

     

    You can also define color. Here is example with green colored ✔︎ OK and red colored ✘︎ Error printed on status label:

    Please login or register to see this code.

     

    You can also show album art on the label using following code:

    Please login or register to see this code.

     

    Hope this helps :-)

     

    Hmm...strange my label shows <font color='#9ACD32'>✔︎ OK</font>

    Posted (edited)
    22 minutes ago, Lode said:

    Hmm...strange my label shows <font color='#9ACD32'>✔︎ OK</font>

     

    Hi @Lode ,

     

    Check your code again.

    This is code for font size and color and bold in action just added to my Internet status QA:

    Please login or register to see this code.

     

    And this is how it looks in browser when reboot is enabled:

    Please login or register to see this spoiler.

     

    As you can see Yubii still does not support bold text, but colors are displayed from long time ago. It seems that text size is no longer supported, but even before it was not resized in the same way as on browser.

     

     

    Edited by Sankotronic
    typo
    • Like 1
    Posted (edited)

    I just added this line with your code

    Please login or register to see this code.

    but it still gives me <b><font size='2' color='#9ACD32'>🔄️ Reboot enabled</font></b> on the label ??

     

    Strange....in the app it looks fine !

     

    Update....i have to look in the UI not in the quickapp development interface.

     

    Thanks again 😉

     

    Edited by Lode
    • Like 1
    Posted

    Hi @Lode ,

     

    I checked with all my 3 browsers Safari, Firefox and Chrome and shows label in bold color.

    You will have to find out why your browser does not show labels with formatting. BTW my HC3 is on stable 5.130.64. What do you see in Yubii app?

    • Like 1
    Posted (edited)

    Hi @Sankotronic

     

    Everything looks fine now.

    Maybe my update on the previous answer crossed your answer.

    Many thanks 😊

    Edited by Lode
    • Like 1
    • 2 weeks later...
  • Topic Author
  • Posted

    This works, thank you for the hints.

    Works in Chrome and Yubii.

     

     self:updateView("label1","text","<font size='10'>"..label1.."</font>")
     
     
    • 1 year later...
    Posted

    Yubii Home iOS app 2.0.3 does not show labels with formatting. However same are displayed correctly on web browsers.

    Is this a known issue with the app?

    Posted
    On 1/29/2023 at 6:36 PM, Sankotronic said:

     

    Hi @Lode ,

     

    Check your code again.

    This is code for font size and color and bold in action just added to my Internet status QA:

    Please login or register to see this code.

     

    And this is how it looks in browser when reboot is enabled:

    Please login or register to see this spoiler.

    @SankotronicI have stumbled upon your post here, and noticed that you are looking for bold text in yubii..actually it is possible..you need to use double <b> tag.. <b><b> sometext </b></b> will give you bold text. We arre using it regularly. See the pic below. The company label, and the room name are all in bold

     

    Please login or register to see this attachment.

    • Thanks 1
    Posted

    Hi @Neo Andersson ,

     

    Thank you for the tip. Do you know it there is a way to check with LUA code what mode is selected to display QA in Yubii app introduced with last FW update? The old way mode is slower in Yubii app but shows formatting with one <b>, while the new mode does not and obviously require different code.

     

    BTW I like how you show table on the label! 👍

    Posted

    I can't recall which topic it was, but i think @jgab somewhere answered this question. I could't find any indication for this parameter in the base JSON structure of the quickapp, maybe i am blind. I think there is no way to determine, but i am not 100% sure.

    • 1 month later...
    Posted

    Hi @Neo Andersson ,

     

    users can check within LUA code if QA property for "Use the new views in mobile application" is checked or not:

    Please login or register to see this code.

     

    Since this new view does not support HTML tags it is now at least possible to adapt formatting before printing on QA labels.

     

    Posted
    On 5/7/2024 at 9:34 PM, Neo Andersson said:
    On 1/29/2023 at 6:36 PM, Sankotronic said:

    Please login or register to see this link.

    @SankotronicI have stumbled upon your post here, and noticed that you are looking for bold text in yubii..actually it is possible..you need to use double <b> tag.. <b><b> sometext </b></b> will give you bold text. We arre using it regularly. See the pic below. The company label, and the room name are all in bold

     

    it seems that using font-weight:bold is also working as per example below for "variable texte":

    self:updateView(libel,'text',"<font size="..taille.." color="..couleur.." font-weight:bold>"..texte.."</font>")

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Reply to this topic...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

    ×
    ×
    • Create New...