Infinite horizon optimal control problems with multiple thermostatic hybrid dynamics