Trying to upgrade esphome on a working esp32 p1-mini board, running esphome usually end up like this, thers an fw upgrade available but somthing have changed soo an upgrade isnt possible even if it worked perfect from the beginning, im trying to move from 2025.4.0 to 2026.2.4 and getting this error
Happy for any ideas to solve this.
INFO ESPHome 2026.2.4
INFO Reading configuration /config/esphome/p1mini.yaml...
ERROR Unable to load component p1_mini.text_sensor:
Traceback (most recent call last):
File "/esphome/esphome/loader.py", line 206, in _lookup_module
module = importlib.import_module(f"esphome.components.{domain}")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/importlib/__init__.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 999, in exec_module
File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
File "/config/esphome/components/p1_mini/text_sensor/__init__.py", line 13, in <module>
CONFIG_SCHEMA = text_sensor.TEXT_SENSOR_SCHEMA.extend(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'esphome.components.text_sensor' has no attribute 'TEXT_SENSOR_SCHEMA'. Did you mean: '_TEXT_SENSOR_SCHEMA'?
Failed config
Platform not found: 'text_sensor.p1_mini'
Ohh im sry, Im soo in this I forgot to that this might just be contryspecific, yes its custom projekt, GitHub - Beaky2000/esphome-p1mini: ESPHome external component for reading P1 data from (Swedish) electricity meters · GitHub
Its not all in on that since its somewhat old and as I said new FW for ESPHome usually kill it due to changes in variables, characters not ok for searchpaths and… yes the list goes on…
My yaml is bad, when I got this to work I tried alot and found out that that fork that I was using had some issues with components library stuff and when I got the full list of components, “esphome did me dirty cuzz of memory constraints” toke me some time to figure that out, I might have gotten more library/components that I needed, still its worked compiling when I shut all unneeded stuff of in HA it compiled and worked perfect, still now I cant upgrade esphome , Im also on a fat N100 16GB pc, its guess its something in the project but I guess they changed something and thats why it dont work upgrading. I mean it still work. I could just leave it but I whould feel better to deal with the issue now instead of founding out that it stops working in a less nice time window, thats why im trying to upgrade it, loong answer but…
Yes it says ERROR Unable to load component p1_mini.text_sensor:
but what have changed in esphome to make that not work now but did before?
I havent chamged anything, all is still there…
repository you provide show tested with esphome 2026.1.1
this specific component with issue was updated 4 month ago.
when was last time you update this device?
maybe “clean build file” will correct your issue.
you may also want to verify the yaml you using matches current. You say you make changes so not sure what differences you may have.
Generally if you are using what is at the github I believe all should work OK unless your system is not retrieving lastest version of that custom component
Hmm ok, I see where I might have wander away, I didnt use clone, I did it manually since I couldnt get it to work , cant remember why but that might have been it, still … esphome is pita when it changes , yet still is the one thing carying it forward… its not like MS DOS… thanks Ill report when I have the time to digg some… perfect!
There have been recent breaking changes to ESPHome in how it handles (and discards) external components. You now have to explicitly reference them.
That time scale is aeons in terms of changes to ESPHome. I would strongly recommend going back and reading all the release notes over the last year as well as going over your code to see how it relates to the current ESPHome documentation. You may find your initial unique requirements can be satisfied by alternate, more generic approaches to read your meter
Yes I saw some others alos having problems with external components, but still its soo hard even without stuff changes… loosing confident in this platform.
what was you purpose for update? it is basically only recommended to update for new feature or security reason. This is really in any software not just esphome.
The logs are fairly clear about cause and overall once running you never need to touch these again. (except security)
I need to modify a unit that has been renamed and are erroring (not fatal) in HA
it eazy to fix but It whould not even validate now.
Warning below.
“is using native unit of measurement ‘kvar’ which is not a valid unit for the device class (‘energy’) it is using; expected one of [‘MWh’, ‘GWh’, ‘TWh’, ‘MJ’, ‘kJ’, ‘mWh’, ‘Mcal’, ‘Gcal’,”