Hi there,
I want to add a time condition to a trigger node. Meaing, the trigger should only triggers within or after a certain time of the day. Could this be done by adding a 2nd condition with the sensor.time? But how to compare those values to my time window?
Does anybody has any glue / advice? Thank you.
Dave
[{"id":"6dcfc4887aa56637","type":"trigger-state","z":"a5f2299564d70994","name":"Rain?","server":"
Hellis81
(Hellis81)
May 28, 2022, 9:42am
2
Your json is incomplete.
Given your description it seems the time should be a condition and not a trigger.
Mikefila
(Mike Fila)
May 28, 2022, 1:38pm
3
If the above is the case, a time range node before should work.
Yes, the time is a condition, not a trigger. I just want to add a certain time as a condition to a trigger node. Is that possible?
Dave
Hellis81
(Hellis81)
May 28, 2022, 6:42pm
5
Trigger nodes are for triggers.
I don’t see a reason to confuse that with conditions.
Have a look at what Mike suggested above. That is a far better and cleaner way to solve it.
Its not about mixing trigger and condition nodes, this trigger has the option for conditions, so why not using it?
Mikefila
(Mike Fila)
May 28, 2022, 10:23pm
7
It does but jsonata is limited and doesn’t have much in the way of time stamp manipulation.
https://lodash.com/docs/4.17.15