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


hub.call(QA_ID,"setVariable","debug","2") still sets Quick app variable value as number


Recommended Posts

Posted

Hi @m.roszak,

 

No matter if above call to change Quick app variable is executed from scene or from Quick app it still converts string with numerical value to number.

Since Quick app variables can store numbers, but then edit button is gone and can't be changed by user anymore on Variables tab of the Quick app that is actually problem.

 

Here is QA debug variable value before this call:

Please login or register to see this attachment.

 

After executing this command:

Please login or register to see this code.

This is a result:

Please login or register to see this attachment.

 

As you can see variable value is changed, but with number, not string and button to edit variable is gone.

 

Since QA variables are string only values, why above command does conversion of string into number?

Or even better question is why QA variables if hold number value can't be edited?

 

Posted
18 minutes ago, Sankotronic said:

Since Quick app variables can store numbers, but then edit button is gone and can't be changed by user anymore on Variables tab of the Quick app that is actually problem.

 

 

I use this "option" to store values for example for workarounds, that I don't want users to edit. (I could also use the internal storage)

Posted

Not just string and numbers - it's the unpacking of call arguments that are buggy. And it's slightly different between scenes and quickapps.
Noted already 4 years ago...

 

 

Posted (edited)

Just running it within the same QA produces funny results, that's why always call the self:method(...) inside a qa, never fibaro.call(self.id,...)
 

Please login or register to see this code.

 

Edited by jgab
  • Topic Author
  • Posted
    2 hours ago, jgab said:

    Just running it within the same QA produces funny results, that's why always call the self:method(...) inside a qa, never fibaro.call(self.id,...)

     

    Hi @jgab,

    above suggestion is not applicable when code of one Quick app needs to change variable of another Quick app. True?

     

    4 hours ago, SmartHomeEddy said:

    I use this "option" to store values for example for workarounds, that I don't want users to edit. (I could also use the internal storage)

     

    Hi @SmartHomeEddy,

    at the beginning of my journey with HC3 I did the same, but now I think I will go for internal storage to have clean list of Quick app variables for users to setup.

     

    Posted
    2 hours ago, Sankotronic said:

     

    Hi @jgab,

    above suggestion is not applicable when code of one Quick app needs to change variable of another Quick app. True?

     

     

    Hi @SmartHomeEddy,

    at the beginning of my journey with HC3 I did the same, but now I think I will go for internal storage to have clean list of Quick app variables for users to setup.

     

    No, calling another QA requires fibaro.call or API rest. The 2021 post shows some ways to overcome it...

    Posted
    On 9/4/2025 at 12:26 PM, Sankotronic said:

    Hi @m.roszak,

     

    No matter if above call to change Quick app variable is executed from scene or from Quick app it still converts string with numerical value to number.

    Since Quick app variables can store numbers, but then edit button is gone and can't be changed by user anymore on Variables tab of the Quick app that is actually problem.

     

    Here is QA debug variable value before this call:

    Please login or register to see this attachment.

     

    After executing this command:

    Please login or register to see this code.

    This is a result:

    Please login or register to see this attachment.

     

    As you can see variable value is changed, but with number, not string and button to edit variable is gone.

     

    Since QA variables are string only values, why above command does conversion of string into number?

    Or even better question is why QA variables if hold number value can't be edited?

     


    It always been like that, but we got a task for allowing different variables types edit in webUI. 

    • Like 2

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