diff --git a/src/apps/smart_grid/SmartOpcServer.cpp b/src/apps/smart_grid/SmartOpcServer.cpp index 3ea0f3f2ed651bf096250883ec5d71c4ddbf504d..58854c7cf094ee5ba9c5590e9a94fb8bfaf3b683 100644 --- a/src/apps/smart_grid/SmartOpcServer.cpp +++ b/src/apps/smart_grid/SmartOpcServer.cpp @@ -71,7 +71,7 @@ void SmartOpcServer::setup_server() m_state = smart_grid_folder.AddObject(m_idx, "state"); m_sun = m_state.AddVariable(m_idx, "sun-Power", Variant(m_state_machine.m_model.get_sun())); m_wind = m_state.AddVariable(m_idx, "wind_power", Variant(m_state_machine.m_model.get_wind())); - m_power_production = m_state.AddVariable(m_idx, "power_production", Variant(m_state_machine.m_model.get_power_production())); + m_power_production = m_state.AddVariable(m_idx, "power_production", Variant(m_state_machine.m_model.get_power_production().sum())); m_usage = m_state.AddVariable(m_idx, "used_power", Variant(m_state_machine.m_model.get_power_usage())); m_excess_power = m_state.AddVariable(m_idx, "excess_power", Variant(m_state_machine.m_model.get_excess_power()));