Home assistant server status LED

Welcome!

Could you use the Home Assistant WLED Integration? Then you can use Automations to do what you want.