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

Scene trigger on device value change (true/false)


squirblej

Question

Hi folks: I have a scene triggering on a motion event from a device which changes the value to "true" (motion detected) and "false" (end of motion event).

 

Please login or register to see this code.

This trigger works perfectly but it's rather duplicative.

 

I was expecting to be able to trigger based on a simple change of value like in HC2.  I can't find a way to do it.  If it were a global variable, I could compare against a random value: 

Please login or register to see this code.

But I can't find a version of this that works for the logical comparison in my device-triggered scene.

 

Ideas?

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 1
15 minutes ago, squirblej said:

Hi folks: I have a scene triggering on a motion event from a device which changes the value to "true" (motion detected) and "false" (end of motion event).

 

Please login or register to see this code.

This trigger works perfectly but it's rather duplicative.

 

I was expecting to be able to trigger based on a simple change of value like in HC2.  I can't find a way to do it.  If it were a global variable, I could compare against a random value: 

Please login or register to see this code.

But I can't find a version of this that works for the logical comparison in my device-triggered scene.

 

Ideas?

 

No, it's not possible. I have had many rants in this forum how badly the conditions "thingy" is implemented.

First it's not made for humans - it's a hack to easily compile block scenes too. That programmers would get access to this must have been an after thought. As you say, the syntax is repetitive and  and prone to errors if typed by humans. It's also semantically iffy, look at the 'cron' expressions and greater and less operators...

And then the lack of essential operators like if an expression has been true for a given time. The possibility to have variables in expression substituting for values (I don't mean the global-variable' but having the value field fetching it's value from a variable.) Then why can't custom-events match against the userDescription field etc etc.

No, how 'conditions' were implemented is probably the worst design mistake in the HC3. Because it could have been great feature done right.

 

Link to comment
Share on other sites

  • 0

+1

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