This page last changed on Sep 21, 2015 by piston.

Hello all,
Now I making the control apps for S-Bus system. I want to count the operation devices in a room.
example: In a room have 10 lights, 5 lights is ON. I want to display a text "5/10 light is ON now"
Anyone can help me?
Thank you,
Hieu

You will need to use rules for this. For example (not tested):

rule "count devices on"
when
  Number(n:intValue) from accumulate($x: Event(source matches "Your light sensor name.*", value=="ON"), count($x))
then
  execute.command("Label with text", n+"/10 lights is ON now");
end
Posted by aktur at Sep 22, 2015 12:25
Document generated by Confluence on Jun 05, 2016 09:33