Stochastic thermodynamics covers this
This predates stochastic thermo quite a bit. Entropy of markov chain is at least 50 y/o, maybe more.