I now get an error when compiling. I suspect something needs to change in the python file, but I don’t know what. The error is:
src/main.cpp:16:1: error: 'empty_text_sensor' does not name a type
empty_text_sensor::EmptyTextSensor *empty_text_sensor_emptytextsensor;
^
src/main.cpp: In function 'void setup()':
src/main.cpp:148:3: error: 'empty_text_sensor_emptytextsensor' was not declared in this scope
empty_text_sensor_emptytextsensor = new empty_text_sensor::EmptyTextSensor();
^
src/main.cpp:148:43: error: 'empty_text_sensor' does not name a type
empty_text_sensor_emptytextsensor = new empty_text_sensor::EmptyTextSensor();
To simplify for debug, I tried just using the “empty_text_sensor” code directly from https://github.com/thegroove/esphome-custom-component-examples. That code is what my actual custom text sensor code is derived from. Both fail with the same “does not name a type” error message.
Maybe something broke with the " Add default device classes to sensor components" change to ESPHome?