Fixing "No such file or directory" for manifest.json for docker users #1121
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixing "No such file or directory: 'custom_components/better_thermostat/manifest.json': could not read version from manifest file." for docker users.
Motivation:
Eversince my homeassistant log shows the following:
2023-11-03 14:55:13.885 ERROR (MainThread) [custom_components.better_thermostat.const] better_thermostat [Errno 2] No such file or directory: 'custom_components/better_thermostat/manifest.json': could not read version from manifest file.
This is annoying, so I fixed it by resolving the path to manifest.json inside the const.py.
Changes:
Using relativ-to-current-file path discovery for manifest.json.
Related issue (check one):
Checklist (check one):
Test-Hardware list (for code changes)
HA Version: 2023.11.0 (using this container: https://docs.linuxserver.io/images/docker-homeassistant/#usage)
Zigbee2MQTT Version: 1.33.2 commit: 9996c93
TRV Hardware: SEA801-Zigbee/SEA802-Zigbee
HACS 1.33.0
BetterThermostat 1.4.0
New device mappings
N/A