Hello, I think that the possibility to control what a crypto currency miner mines would be possible. One can for example get the current energy price and shut down or start the miner based on profitably.
This mining tool seems to have a API:
Chia miner api:
There are also some api’s here