I recently purchased some INA237’s from the Adafruit store, but when connecting to my feather, I am receiving the below alert on reading the default address of 0x40 using the INA237 configuration in ESPHome:
Device model mismatch. Found device with ID = 238. Please check your configuration.
When I change the device to the INA238, the voltage/current registers in HA. On INA237, no values register. I am also unsure if they are the correct numbers as I have not compared yet to a metered reading.
This is likely because the INA237 is just an INA238 that did not meet the specs when it was tested and so it was rebranded as an INA237. There is always process variation and some parts will be better than others. Sometimes these get thrown out. Other times they end up in the gray market. Here, TI is avoiding throwing them out and sells them for less because they are not as good as the others.
The log you sent shows that your chip (despite saying it is an INA237 on the cover) identifies as an INA238 on the inside. So to make esphome happy, you should tell it that it is an INA238. Maybe some INA237 devices identify as all zeros or all ones. The datasheet doesn’t say anything about what they should do. So, really the right answer (for yours) is to say you have an INA238 (it just isn’t quite as good as the ones you have to pay extra to get).