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 (edited)

Hello

Anyone know about this bug?

Using the new switch type button in a quickapp never changes its face when clicked. Neither in web interface nor in Yubii.

It only changes when in EDIT mode of quickapp.

 

And if somone can share with me, how to udpdate its state from LUA, becuase

Please login or register to see this code.

doesnt work
Edited by Neo Andersson
  • 3 weeks later...
Posted

I'm a little bit late to the party, but you have to send the boolean as a string, and then it works:

 

Please login or register to see this code.

 

  • Like 2
  • Thanks 1
  • 4 weeks later...
Posted

Please login or register to see this link.

I explain with real world examples how the new switch button can be programmed with Lua. 😀

  • Like 4
  • 2 months later...
  • Topic Author
  • Posted

    this switch button doesnt work as intended. It never changes its state. @m.roszak Michael, maybe you can assist on this a little bit. See on the video, i am pressing the switch but it doesn't state its value. Always sending true in param.values[1].

    • Like 1
    Posted

    It works for me (MacOS/Safari) if I do

    Please login or register to see this code.

  • Topic Author
  • Posted
    23 minutes ago, jgab said:

    It works for me (MacOS/Safari) if I do

    Please login or register to see this code.

    yes, we can set buttonface direclty by updateView, but first of all i think this is a faulty behaviour..why would we need to set it manually? it should change according to its state, but the problem is, its state never changes as you can see, It is always true.

    Posted

    Yes, it's buggy that we need to call updateview but it does change state if we do it.

    Please login or register to see this code.

     

    Posted

    I did post a generic patch +2months ago that fixes this for switches, sliders and drop down menus 

    Please login or register to see this code.

     

    • Thanks 2
    Posted

    The switch control operates similarly to the slider. Its purpose is to grant you full control, allowing you to decide when the view should update.

    Typically, when a user interacts with a slider/switch value, data is sent to a third-party device. However, there's a possibility of communication errors occurring. In such cases, the slider/switch should remain in its previous position until confirmation is received.
    The view should only update after receiving an acknowledgment (ACK) or a report from the device indicating that it has achieved the desired state.

     

    However, it might be worth considering enabling an optimistic approach, where the view state changes immediately after the user's action. We'll explore this further :)

    Attached is an example featuring a switch, with the added bonus of handling long presses.

    Please login or register to see this attachment.

    • Like 1
  • Topic Author
  • Posted
    42 minutes ago, w.rys said:

    The switch control operates similarly to the slider. Its purpose is to grant you full control, allowing you to decide when the view should update.

    Typically, when a user interacts with a slider/switch value, data is sent to a third-party device. However, there's a possibility of communication errors occurring. In such cases, the slider/switch should remain in its previous position until confirmation is received.
    The view should only update after receiving an acknowledgment (ACK) or a report from the device indicating that it has achieved the desired state.

     

    However, it might be worth considering enabling an optimistic approach, where the view state changes immediately after the user's action. We'll explore this further :)

    Attached is an example featuring a switch, with the added bonus of handling long presses.

    Please login or register to see this attachment.

    It is not only about the face problem. It is buggy in general. It never changes its state. Not only its buttonface, but in onToggles callback function you never get the real state of the switch. It is a faulty behaviour. It always sends TRUE..

    Posted

    For me it works, I tested it last weekend. Strange it always sends true at your side.

     

     

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