This is my ESPHome configs that I use, the latest of which is an amp key holder that tracks what keys are plugged in.