Open michaelblight opened 7 months ago
I use __FILE__ in exactly the same way, and it broke with ESPHome v2023.12. For me it has been resolved by PR https://github.com/esphome/esphome/pull/6139 which didn't make it into v2023.12.9, I'm hoping the fix will be included in v2023.12.10 or v2024.2. Also see https://github.com/esphome/issues/issues/5354 https://github.com/esphome/issues/issues/5377 https://github.com/esphome/issues/issues/5423.
esphome 2024.2 has has resolved this issue, for me at least.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
The problem
I had this code a long time ago (as in a few years), and it worked to provide the source file in a sensor:
However now it always produces "".
Which version of ESPHome has the issue?
2023.12.9
What type of installation are you using?
Home Assistant Add-on
Which version of Home Assistant has the issue?
2023.12.4
What platform are you using?
ESP32
Board
m5stick-c
Component causing the issue
text_sensor
Example YAML snippet
And this is the content of m5stick-c-base.yaml:
Anything in the logs that might be useful for us?
Additional information
I am also using the following and this works fine: