I have a max31856 sensor component working just fine. It’s a thermocouple amplifier sensor and it returns the temperature of the probe. This max chip has some other sensor values like the chip temperature id like to expose. I looked at the max31856 sensor component code in GitHub and I see there is a method to read a register which i can do to get the other sensor values. But I can’t see in the sensor cpp or .h file where the component defines the entity or controls what and when the update function gets called. I haven’t been able to find any docs on creating custom esphome components.
Can someone point me to the files for a sensor component that define the entity to b exposed and what method gets called on an update call?
Yea read this a few times and still not finding explanation of how to code a custom component. How do you specify the resulting entity names….what methods get called and when….etc?
Did you read the linked page Contributing? That’s the best you’ll get unfortunately, but the good news is that you can use an existing component’s files to create your own external component.
You could even do a formal PR and modify the existing one for everyone.
And the best place to get answers from the devs is Discord - they are more likely hanging around there than the forums.