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


  • 0

How to change icon of VD?


Stiven
 Share

Question

Hello,

 

I have created multiple virtual devices but never found out how to change the main icon. I have used: 

Please login or register to see this code.

but it doesn't work. I need a solution to setup an icon that stys unchanged, even if buttons are pressed. Thank you!

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0

You must select an icon for each button you created.

 

Please login or register to see this image.

/monthly_2020_06/VD-icons.jpg.1b223f4c20b2f491021c4e787e80ed4f.jpg" />

Link to comment
Share on other sites

  • 0
  • Inquirer
  • I think there is a misunderstanding, I need the main icon of the vd to be changed, not the icons on the buttons

    Link to comment
    Share on other sites

    • 0

    No misunderstanding, when you click on a VD button, the VD main icon changes to the icon you have selected for that particular button.

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • Thanks for the clarification, is there a way to keep one icon as the main one and to not change when there is button presses or anything?

    Link to comment
    Share on other sites

    • 0
    On 6/8/2020 at 2:12 AM, Stiven said:

    Hello,

     

    I have created multiple virtual devices but never found out how to change the main icon. I have used: 

    Please login or register to see this code.

    but it doesn't work. I need a solution to setup an icon that stys unchanged, even if buttons are pressed. Thank you!

     

    I don't know if you have solved it yet. When I press a button the icon changes to the icon of the button, but thanks to the code in the main loop the icon changes back to "default". This will do it every 60 seconds

     

    I have this in the VD mainloop:

    fibaro:call(642, "setProperty", "currentIcon", 1071)

    fibaro:sleep(60000)

     

    642 is the VD ID

    1071 is icon number

    Link to comment
    Share on other sites

    • 0

    would you not just put the same icon in each of the buttons? This way when each button is pressed the main icon wont change. 

     

     

    Link to comment
    Share on other sites

    • 0

    You can use

    To setup default icon for all buttons and sliders on VD at one go. Extremely helpful for VD's with plenty buttons and sliders.

    How to setup other icons to reflect some state of the VD you can always download any of my VD's and go through code.

    Good examples are HUE AIO VD or Netatmo Weather station.

     

    All my VD's also have code that sets main icon to all buttons and sliders. You can also find there code that can add any type of global variable on the first run and even keep monitoring and regenerate any global that is found damaged automatically. This makes sharing of VD's much easier since other users can install VD and use it immediately by just doing some needed setup and not needing to manually add anything except icons. After adding icons to HC2 Icon Preview VD can be used to find new imported icons ID number needed to finish VD setup :-)

     

    UHAS version of this VD of course provides setting up all of the icons needed for particular VD with few clicks which speeds up installation process.

     

    Link to comment
    Share on other sites

    Join the conversation

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

    Guest
    Answer this question...

    ×   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.

     Share

    ×
    ×
    • Create New...