Different models for different time durations of a day
This is a typical time series problem. The first step is to make sure your time series is stationary, see here for a good explanation why this is necessary.

So we first do,

dframe$power_diff &lt;- c(NA, diff(dframe$power))
plot(dframe$power_diff, type = "l")


gives,



Next we want to consider an ARIMAX model. As part of this exercise we want to know whether there is a dependency in the time series, a so called auto regressive term. We can research this using,

acf(na.omit(dframe$power_diff))


which gives,

 

In this plot we see that there is a positive auto regressive term at lag 1 at a significance level of 95%, we conclude this based on the observation that the second line, which is lag 1, is above the blue dotted line.

Next we want to fit a ARIMAX model.

# Convert data to ts object
power_data &lt;- ts(data = dframe$power_diff[-1], frequency = 8766, start = c(2016, 1, 1))
temp_data &lt;- ts(data = dframe$temp_diff[-1], frequency = 8766, start = c(2016, 1, 1))

# Build the model.
m &lt;- Arima(power_data, order = c(1, 0, 0), xreg = temp_data)

# Let's see how our fit is.
plot(power_data)
lines(fitted(m), col = "blue")


This gives this result,



You can play with the ARIMA(p, i, q) terms. We should leave $p=1$ since we found that the AR term is significant at lag 1. If we add a MA(1) we find a model that has a MAPE=260.46 versus a MAPE=272.62 for our initial model. So you can create the best model using,

m2 &lt;- Arima(power_data, order = c(1, 1, 0), xreg = temp_data)
lines(fitted(m2), col = 'red')


Will lead to,


Of course we can automate the above step with auto.arima(). This function will search for the best arima model,

m3 &lt;- auto.arima(power_data, xreg = temp_data)
lines(fitted(m3), col = 'green')


which will give you,


You see that each model has a poor fit in the spike. To improve this you could introduce a dummy variable,

xdata &lt;- ts(data = as.matrix(cbind(temp_data, dframe$power_diff[-1] &gt; 20)), frequency = 8766, start =c(2016,1,1))
m_dummy &lt;- auto.arima(power_data, xreg = xdata)
lines(fitted(m_dummy), col = 'orange')


which gives us the following result,


We see that this model gives us a much better result. So if you can relate dummy to a point in time you could create a model that has a good fit.

According Occam's Razor you should try to keep your models simple. So I would suggest to build a single model for all your time slots instead of three separate models as you suggested in your question.

You can turn this back to the original time series with cumsum. Hope this helps.