Add daily production values.
This commit is contained in:
@@ -58,7 +58,7 @@ for ($date_diff = $interval->days; $date_diff > 0; $date_diff--) {
|
||||
$grid_feed = 0;
|
||||
}
|
||||
|
||||
$aggregation_query = 'INSERT INTO ' . $local_table . ' (`date`, `meter_consumption`, `power_sensor`, `grid_feed`, `last_value`) VALUES ("' . $date->format('Y-m-d') . '", ' . $meter_consumption . ', ' . $power_sensor . ', ' . $grid_feed . ', ' . $consumption_end . ');';
|
||||
$aggregation_query = 'INSERT INTO ' . $local_table . ' (`date`, `meter_consumption`, `power_sensor`, `grid_feed`, `last_value`, `production_eg`, `production_og`) VALUES ("' . $date->format('Y-m-d') . '", ' . $meter_consumption . ', ' . $power_sensor . ', ' . $grid_feed . ', ' . $consumption_end . ', 0, 0);';
|
||||
|
||||
$local_db->query($aggregation_query);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user