Multiple Shelly TRV to control a single relay

I have a similar solution to RonnieLast, but since somehow I do not succeed to master YAML, I have done it via AppDaemon where I can program the logic in Python. My inspiration came from

I still should work out a solution in case one or more TRV’s “dissapear” and were in the heating status, but until now I did not experience this problem. Would add code here but the forum only allows images to be uploaded…