Rule for comparing two (2) sensor values

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”
’ value of “sensor A” is equal to value of “sensor B” ’
execute.command( “light on” );



Hi Marc

Have you tried to manipulate the Alarm Protocol?

All you'd need to do is set the time in your UI.

You can also select which days it will fire from the UI.

No, I have not done this and this is not what I am looking for. I want to define the time for firing the command out of the UI and not having a fixed time defined inside a cronjob or file. That the reason why I need to compare the two sensors.


As Stuart mentioned the alarm protocol can achieve this, the times and days can be altered and displayed in the UI.