This is not in a format that can be properly shared with others. Please either put this into a github gist, or format it as per the FAQ for this site:
How to help us help you - or How to ask a good question.
I also recommend adding your link to a ;my; link using this:
More suggestions from the HA Docs:
Creating an automation blueprint - Home Assistant.