ha-warmup/warmup

"Version Error" in HA log on start up

Closed this issue · 9 comments

HA appears to be looking to check Custom Component versions in the future - I guess to advise Users if newer Versions have been found.

No 'version' key in the manifest file for custom integration 'warmup'. This will not be allowed in a future version of Home Assistant. Please report this to the maintainer of 'warmup'
13:46:57 – loader.py (WARNING)

Adding "version": "0.1.6" as implied by HA documentation does not correct this as hoped. This appears to be due to the "domain" stated in manifest.json (warmup_cc)not matching the custom_component folder name "warmup".

Changing the domain to "warmup" and adding the "version": "0.1.6" text into manifest.json does seem to work, but I have no idea what the impact of this change might be to other components.

Clearly the change process will have to reference changing this 'version text' for each revision.

Does anyone understand why warmup_cc is used / does it matter to change it to warmup? otherwise will need to change custom_ components folder to warmup_cc

artmg commented

Thanks for raising this issue, as it's good to know where the HA devs are taking things.

The names chosen are partly from the historic code this was forked from, and partly from the names used for the python library this project started using. At some point someone must have thought "Custom component? Let's add _cc." There is some relevant information in the Project Wiki, and you want to understand what's what and where it came from, you can try starting with the Architectural introduction page.

Just so you know, the idea of the wiki is that other people, including users and contributors like you, are welcome and encouraged to add to the documentation if they spot anything missing or inaccurate.

artmg commented

Oh, and looking at the installation instructions in the home page / README, it states

cp -r /tmp/warmup/warmup_cc/* ./custom_components/warmup

NB: Previous versions of these instructions stated to use warmup_cc however this is now simply warmup

Theoretically switching back to _cc might 'fix the issue' but I'm wondering whether this is a good time to change the domain and other items to remove the _cc suffix instead? Perhaps when I get a chance to look through the project history it might become clearer which way to go.

artmg commented

I think that you are right @dizzi77 that removing the _cc would be the way to go. A previous issue from a major contributor #4 was proposing that, and looking at the way other custom components are named, it makes total sense. I have looked at the other components, and I can see no reliance on the suffix _cc so it should be enough to:

  • modify the domain in the manifest from warmup_cc to warmup
  • rename the component folder from warmup_cc to warmup
  • update the installation instructions so the source folder copied goes from warmup_cc to warmup

As far as the version is concerned, the Dev Docs for an integration manifest recommend using anything supported by the Awesome Version test software (built by the one of the cornerstones of the custom component community). In the absence of any other version guidance I'd be tempted to pick something date oriented, like "2021.03.0", but I'm open to better suggestions.

Do you think that would sort it all out?

Worth noting that this error now has a timeframe associated with it.

Logger: homeassistant.loader
Source: loader.py:786
First occurred: 21:17:29 (1 occurrences)
Last logged: 21:17:29

No 'version' key in the manifest file for custom integration 'warmup'. As of Home Assistant 2021.6, this integration will no longer be loaded. Please report this to the maintainer of 'warmup'

I think that you are right @dizzi77 that removing the _cc would be the way to go. A previous issue from a major contributor #4 was proposing that, and looking at the way other custom components are named, it makes total sense. I have looked at the other components, and I can see no reliance on the suffix _cc so it should be enough to:

* modify the domain in the manifest from warmup_cc to warmup

* rename the component folder from warmup_cc to warmup

* update the installation instructions so the source folder copied goes from warmup_cc to warmup

As far as the version is concerned, the Dev Docs for an integration manifest recommend using anything supported by the Awesome Version test software (built by the one of the cornerstones of the custom component community). In the absence of any other version guidance I'd be tempted to pick something date oriented, like "2021.03.0", but I'm open to better suggestions.

Do you think that would sort it all out?

Sounds sensible to me but I'm no expert - I guess the question is whether changing the domain to "warmup" would cause any specific issue. Thankfully, and for no reason I'm aware of, I installed to the warmup folder rather than warmup_cc.

I like the versioning YYYY.M.D (without any leading zeros):

2020.9.28
2021.1.1
2021.4.13
2020.12.31
rct commented

Submitted a quick and dirty PR #28 with the manifest.json changes described above. Loads on 2021.5.x without any errors other than the usual 'you are using a custom integratoin warmup which has not been tested by Home Assistant'

artmg commented

Submitted a quick and dirty PR #28 with the manifest.json changes described above. Loads on 2021.5.x without any errors other than the usual 'you are using a custom integratoin warmup which has not been tested by Home Assistant'

Many thanks for the PR, @rct - 'quick' - action is always appreciated, 'dirty' - you tested it so it's not that dirty. Unfortunately my knowledge of git flows was not good enough to leave your contributions in AND also add the other fixes people have suggested in this thread, sorry that you won't get the credit you deserve.

I like the versioning YYYY.M.D (without any leading zeros):

I'm happy to drop the superfluous zeroes @lwsrbrts seeing as AwesomeVersion can get by without them.

I appreciate the contributions and opinions people have been giving on this issue. Consensus here was drop the _cc which I have now done in the project folder structure and docs too. I have bundled up all the resulting changes, my only issue is that I'm not in a position right now to test the new PR #29 to make sure it all works before merging it. If someone else could please manage to test the code in artmg:patch-25 as QA then we can put this issue to bed finally. Thanks

I'm running the code from your patch on HA 2021.5.5 currently. All seems fine to me. The only error in the logs is the usual:

You are using a custom integration warmup which has not been tested by Home Assistant.

Here's my climate entity:

hvac_modes:
  - heat
  - auto
  - 'off'
min_temp: 5
max_temp: 30
target_temp_step: 0.5
preset_modes:
  - away
  - home
  - boost
current_temperature: 20.5
temperature: 22.5
hvac_action: heating
preset_mode: home
floor_temperature: 20.5
air_temperature: 23
away_temperature: 15
comfort_temperature: 20
cost: '0.01'
energy: '0.04'
fixed_temperature: 17
override_temperature: 22.5
override_duration_mins: 18
sleep_temperature: 18
run_mode: overide
room_mode: fixed
heating_target: floor
friendly_name: Kitchen
supported_features: 17

Also tested the service and that does indeed set the correct temperature so looks OK for me.

I'll probably go for an upgrade to HA 2021.6 later today or tomorrow.

artmg commented

many thanks to @lwsrbrts for final QA testing, and to others for support, suggestions and code