Hello gerrishp2,
Welcome to the Home Assistant Forum.
This can be done with integrations, templates, and other clever ways.
For instance this could work for you: Compensation - Home Assistant
Also having someone or something writing it for you means the second it misbehaves, you will be struggling back to find someone to fix it for you.
The best way to learn is to just try. Run thru the docs on getting started with the automation editor. If you get stuck, come back with what you have done.