I wish to set the property of a thing based on time
if time is between 2pm and 3pm the property value should be 50
if it is between 5pm and 6pm property value should be 75
How can I achieve it?
Thank you for any reply
You need to create a Thing based on a Timer or Scheduler Template and subscribe to Timer/Scheduler trigger event, there you can set the other Thing's property to 50 and/or 75 based on timestamp.
On your use case, you can set a Scheduler thing which triggers every exact hour, and depending on the timestamp setting the corresponding property on the other thing.
One possible solution would be to create a Scheduler Thing, and you could set time period as every 1 hour like
Then you will create a Subscription and use the Scheculder to be the trigger event, and then you could author your code like:
var date=new Date();
// then you could set your property values here...
Hope this helps,
Aha this usually happens
Thanks for answering the customer's questions.
It's really a good thing that our dear customers give great ideas/suggestions to each other!
please keep on to give us and our customer more good ideas Carles Coll
Dear Jugal Shah,
Does your issue resolved? if so please mark correct answer or post your correct answers here and we could close this thread