Data prediction using scikit-learn and a list
There are two popular approaches:

Model it with traditional supervised binary classification algorithms (e.g., logistic regression or Random Forest) and generate features (e.g., look back 1 steps, look back 2 steps, …)

Model it with a Hidden Markov Model (HMM). The hidden state is the machine on or off. The observed state is temperature. Given the observed state, what is the most likely hidden state that would generate it?