Does anyone know how to create a binary sensor within an ESPhome device that tracks the connection to the Home Assistant API? i.e. one which is true when connected to HA but then goes false if HA is rebooted or otherwise goes offline and then becomes true again upon reestablishing a connection.
EDIT: Yes I was missing something, this is in the esphome section, and I know very little about esphome, so my advice may well be incorrect, but leaving it here just in case .