This page last changed on Jul 25, 2014 by nokk3r1.

I have http sensor to get hourly electricity price. I have own sensor for every hour. I want to copy every hour the current price to sensor named current price. current price is in memory virtual sensor with command status.

rule "Hinta klo 01"
timer (cron: 0 00 01 ? * 1-7) when eval (true)
then
CustomState( source=="01", $w1 : value);
execute.command("current price", $w1);
end

Some reason it doesn't get copied. Can you please help.

Try this one:

rule "Hinta klo 01"
  timer (cron: 0 00 01 ? * 1-7) when CustomState( source=="01", $w1 : value)
then
  execute.command("current price", $w1.toString());
end
Posted by aktur at Jul 26, 2014 17:41

Thank you for your help. Had hard time getting it work until I realized that I was missing one line from very top of the rules.

Posted by nokk3r1 at Aug 11, 2014 21:27
Document generated by Confluence on Jun 05, 2016 09:36