I like to display my overall power consumption over 1 day, the actual month and the actual year and overall years. therefore I created following rules
when every 1 minute then set $variable_number_cumulativepower_day_actual = $totalpowerofoutlets - $variable_number_cumulativepower_month_actual when its \"first day of month 00:00\" then after 20 seconds set $variable_number_cumulativepower_year_actual = $variable_number_cumulativepower_month_actual and set $variable_number_cumulativepower_month_actual = 0 when its \"Jan 01 00:00\" then after 40 seconds set $variable_number_cumulativepower_year_old = $variable_number_cumulativepower_year_old + $variable_number_cumulativepower_year_actual and set $variable_number_cumulativepower_year_actual = 0 and set $variable_number_cumulativepower_month_actual = 0
$totalpowerofoutlets is a variable which simply is the sum of all outlet powermeters i have.
Somtimes everything is 0 sometimes it is the correct values. Whats wrong with the rules and there synchronisation???