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

Seeing what value(s) triggerd the scenes?


Question

Posted

One of my scenes needs to know what "value" (4 of them) triggered it.

I was hoping to use startSource = fibaro:getSourceTrigger();, but this does not work.

(returns: table: 0x9c492e0, table: 0x85e9bd0 and so on)
 

Anyone here who might know how to get the trigger value?

 

Please login or register to see this code.

7 answers to this question

Recommended Posts

  • 0
Posted

startSource is an array of values.

In your case please use as follow:

 

fibaro:debug(startSource["deviceID"])

 

In case you want to use it as a number, remember to convert it

 

devID = tonumber(startSource["deviceID"]) 

  • 0
  • Inquirer
  • Posted

    Simple and effective!

     

    Thank you.

    • 0
  • Inquirer
  • Posted

    Hmmmm unfortunately it's always returning nil !

    Please login or register to see this code.

    • 0
    Posted

    No.. no .. no

    Use as I wrote.. do not change anything at the command line

     

    fibaro:debug(startSource["deviceID"])

     

    Do not replace "deviceID" with your number, this is the name in the array.

     

     

    here is part of my code:

    Please login or register to see this code.

    • 0
    Posted

    for more information please use following link:

     

    Please login or register to see this link.

    • 0
    Posted

    You forgot this:

    local startSource = fibaro:getSourceTrigger();

    • 0
  • Inquirer
  • Posted

    got it.. thank you.

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