Why is my LSTM, stateful network getting 0 accuracy
Your code is absolutely fine. Also, the model is working as you can see the loss is continuously decreasing.

The thing is, this is a regression problem and accuracy is used for classification tasks. It just calculates how often predictions match labels by comparing if the classes are the same. See here for more details on how it works. So, just remove accuracy from your metrics and you are good to go.