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

Virtual device's icon disappearing every click


Def461

Question

Hello!

Software Version: 3.591

Making virtual devicу for Dune HD player.

Add 128*128 icon for tha device. If I click on the device in the room page - the icon reverts to the 3D blue cube until I manually re-add the icon in programming mode.

Is it a bug?

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0
Guest Kuuno

no, every button has an icon and default is blue box...

Please login or register to see this image.

/emoticons/default_smile.png" alt=":)" srcset="https://forum.fibaro.com/uploads/emoticons/[email protected] 2x" width="20" height="20" />

Link to comment
Share on other sites

  • 0

No it isn't.

You have to change the buttonicons also in the advanced tab. The main icon is changed to the icon when a button is activated. So you'll see the last buttonicon which is activated.

When you save the virtualdevice, the icon is changed to the main (default) icon.

You can also change an icon by lua, for example, when adding this code to your main loop:

Please login or register to see this code.

This code will change your virtual device icon every 3 seconds. (last icon will be there for 6 seconds because the main loop has a 'build-in delay' of 3 seconds).

Btw, I didn't test the code but it should be working, it's just intended for explanation.

Link to comment
Share on other sites

  • 0
  • Inquirer
  • Thanx.

    Can't find any logic of changing the icon on key pressed

    Please login or register to see this image.

    /emoticons/default_smile.png" alt=":)" srcset="https://forum.fibaro.com/uploads/emoticons/[email protected] 2x" width="20" height="20" />

    Sorry.

    Link to comment
    Share on other sites

    • 0

    Try This on every button

    local selfId = fibaro:getSelfId();

    local icon = fibaro:get(selfId, "deviceIcon");

    fibaro:call(selfId, "setProperty", "currentIcon", icon)

    Link to comment
    Share on other sites

    • 0

    This is helpful, however is there a way to get the image the device has right NOW? Because if I change the icon within the code but don't want to let it change to the buttons icon nor the default icon.

    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.

    ×
    ×
    • Create New...