Hello Forum,
I am trying for some time to create a rule which shall compare two sensor values without success, so maybe somebody here could help me with that.
I have created a virtual slider which returns via a sensor (sensor A) type RANGE an integer value between 0…23.
Another sensor (sensor B) type CUSTOM is returning the actual hour of the day (that sensor is linked to a DateTime Protocol).
Now my goal is to implement a rule which fires a command in case both sensors have to same value. As you can see above I want to start something at defined ‘full hour of a day’, but due to the fact that I want that so kind ‘cron job’ to start at a flexible time, I need the comparison of those two values, where one is integer and the other one returns as a string, so a conversion of the string to integer is needed as well.
In general that rule shall look like this:
rule “start task”
when
’ value of “sensor A” is equal to value of “sensor B” ’
then
execute.command( “light on” );
end
Regards,
Marc