This paper presents an intelligent hybrid framework for short-term energy consumption forecasting and real-time energy management in photovoltaic (PV)-integrated smart homes with Vehicle-to-Home (V2H) systems, tailored to the Tunisian context. The forecasting module employs an Attention-based Long Short-Term Memory (LSTM) neural network, whose hyperparameters (learning rate, hidden units, temporal window size) are optimized using the Harris Hawks Optimization (HHO) algorithm. Simulation results show that the proposed LSTM-HHO model achieves a Root Mean Square Error (RMSE) of 269 Wh, a Mean Absolute Error (MAE) of 187 Wh, and a Mean Absolute Percentage Error (MAPE) of 9.43%, with R2 = 0.97, substantially outperforming conventional LSTM (RMSE: 945 Wh, MAPE: 51.05%) and LSTM-PSO (RMSE: 586 Wh, MAPE: 28.72%). These accurate forecasts are exploited by the Energy Management System (EMS) to optimize energy flows through dynamic appliance scheduling, HVAC load shifting, and coordinated operation of home and EV batteries. Compared with baseline operation, PV self-consumption increased by 18.6%, grid reliance decreased by 25%, and household energy costs were reduced by 17.3%. Cost savings are achieved via predictive and adaptive control that prioritizes PV utilization, shifts flexible loads to surplus periods, and hierarchically manages distributed storage (home battery for short-term balancing, EV battery for extended deficits). Overall, the proposed LSTM-HHO-based EMS provides a practical and effective pathway toward smart, sustainable, and cost-efficient residential energy systems, contributing directly to Tunisia’s energy transition goals.