This object is in archive! 

Do not run a rule when the virtual sensor does not change state

Guest shared this idea 10 years ago
Under Consideration

Hello,


At this time when a rule is based on a virtual sensor but when the virtual sensor receive the information that is equal to its current state, the rule is run.


It could be nice to not run the rule when the state is not modified.


Otherwise, is it possible to get the state of a virtual sensor with a get? I had some difficulties to get the values of the sensors from the API, I got a lot of \u in the JSON


Regards

Fred

Replies (5)

photo
1

So actually I get :

  1. <Response [200]> - {u'uiType': u'SENSOR', u'endpoint': u'xxxxxxxxxxxxxxxxxxxxxxx', u'name': u'Soleil', u'iconName': u'Sun position meter', u'attributes': {u'13': {u'timestamp': 1385838012273L, u'type': u'BOOLEAN', u'id': 13, u'value': u'false', u'name': u'state'}}, u'iconType': u'meter.sunposition', u'description': u''}

photo
1

Sorry, it is because it is in unicode!

photo
1

I don't understand. In WHEN condition with a virtual sensor condition active equal true and rule runs. What do you mean by modified?

photo
1

Actually if you send two times the request to inactive a virtual sensor and if you have a rule on INACTIVE it runs 2 times the rules even if the virtual sensor was not active


But anyway if it is not a good idea, I found a solution to my problem :).

photo
1

OK, you want a second inactive state to trigger the false state rule again. As a toggle behaviour?

Leave a Comment
 
Attach a file