alarmo icon indicating copy to clipboard operation
alarmo copied to clipboard

Error setting up entry Alarmanlage for alarmo ("unexpected keyword argument 'config_panel_domain'")

Open bcutter opened this issue 1 year ago • 5 comments

Alarmo Version

v1.9.14

HA Version

2023.4.6

Bug description

https://github.com/nielsfaber/alarmo/issues/882#issuecomment-1928450403

Integration fails to load.

Interestingly the control panel entity is created just fine: grafik

It's "just" the Alarmo integration itself being not operational... grafik


Happened after restarting HA after roughly a month, likely Alarmo integration has been updated meanwhile from HACS (to v1.9.14). How to fix this?

  • For now I reverted back to v1.9.13 which "solved" the issue (Alarmo integration loaded and operational) - at least it buys some time for some expert here to figure out what causes this and how to fix it...
  • What changed in 1.9.14 that breaks this?

Content of homeassistant / .storage / alarmo.storage:

{
  "version": 6,
  "minor_version": 3,
  "key": "alarmo.storage",
  "data": {
    "config": {
...
`

### Steps to reproduce

1. Update Alarmo from 1.9.13 to 1.9.14
2. Check HA logs and device integration page --> Alarmo not loading

### Relevant log output

```shell
Dieser Fehler wurde von einer benutzerdefinierten Integration verursacht

Logger: homeassistant.config_entries
Source: custom_components/alarmo/panel.py:33
Integration: Alarmo (documentation, issues)
First occurred: 23:44:23 (1 occurrences)
Last logged: 23:44:23

Error setting up entry Alarmanlage for alarmo
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 383, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/config/custom_components/alarmo/__init__.py", line 84, in async_setup_entry
    await async_register_panel(hass)
  File "/config/custom_components/alarmo/panel.py", line 33, in async_register_panel
    await panel_custom.async_register_panel(
TypeError: async_register_panel() got an unexpected keyword argument 'config_panel_domain'

bcutter avatar Feb 06 '24 11:02 bcutter

@nielsfaber following up on https://github.com/nielsfaber/alarmo/issues/882#issuecomment-1928829353

@bcutter your issue is not related to the topic discussed here. I think your issue is caused by an incompatible HA version. The error is related to a property that was added to HA about half a year ago.

Yes, I need to update my HA. At the same time:

  1. Which release and which PR introduced this property?
  2. Which Home Assistant version is needed to run Alarmo >= 1.9.14?
  3. 1.9.13 was working fine which has been released at Nov 4, 2023 (thats 3 months since).
  4. I could not spot a "requires at least Home Assistant version 202x.x" breaking change or note on any release notes at https://github.com/nielsfaber/alarmo/releases. I think it is a good practise to at least leave a note if those dependency requirements are not handled properly by HACS.

Are you aware of https://hacs.xyz/docs/publish/integration (see blueprint at https://github.com/ludeeus/integration_blueprint/blob/main/requirements.txt)?

homeassistant==2023.8.0

That way people would not run into such issues - the updates are simply not shown at all. That's the "perfect" solution for shipping integrations with HACS. Using the release notes is just the 2nd best attempt, but at least... "better than nothing" :-)

bcutter avatar Feb 06 '24 11:02 bcutter

Which release and which PR introduced this property?

https://github.com/nielsfaber/alarmo/commit/065c7b5138787dbe2cb8547d042b62c7497fdcb8, part of 1.9.14 release.

Which Home Assistant version is needed to run Alarmo >= 1.9.14?

I only tested with HA 2024.1. Older versions may work as well but untested.

1.9.13 was working fine which has been released at Nov 4, 2023 (thats 3 months since).

Feel free to keep using that version until you're ready for updating HA as well.

I could not spot a "requires at least Home Assistant version 202x.x" breaking change or note on any release notes at https://github.com/nielsfaber/alarmo/releases. I think it is a good practise to at least leave a note if those dependency requirements are not handled properly by HACS.

Alarmo releases are always made and tested with up-to-date (stable) HA version, so the Alarmo release of January was tested on HA 2024.1 (January release). Older versions may work but untested. Since HA is a plug-in of HA, the development goes hand-in-hand. Regularly changes in HA force me to make updates in Alarmo.

Are you aware of https://hacs.xyz/docs/publish/integration (see blueprint at https://github.com/ludeeus/integration_blueprint/blob/main/requirements.txt)?

Yes. This project has it set at 2023.4. I will update it to 2023.11 (date of the PR with the breaking change).

nielsfaber avatar Feb 06 '24 18:02 nielsfaber

Thank you for that detailled information 👍

Feel free to keep using that version until you're ready for updating HA as well.

This is the way.

Yes. This project has it set at 2023.4. I will update it to 2023.11 (date of the PR with the breaking change).

If that makes the 1.9.14 update to disappear as long as ones HA is not up to date, I think that's a good "solution" for these cases. Let me know once 1.9.14 (or if necessary 1.9.15) has been changed that way so I can confirm (in theory the update should then not be shown anymore in my HACS (disappear)). Let me check - after that up to you if you want to close this issue.

bcutter avatar Feb 06 '24 19:02 bcutter

The minimum required HA version is already updated: https://github.com/nielsfaber/alarmo/blob/8364c7522b5dcfa1875331ddb0aee256e14dbda4/hacs.json#L7

I believe this setting applies to the whole project. This is not a file that is part of (or connected to) a released version. So HACS should state that Alarmo is not compatible for your HA version and also hide any updates. I only tested this functionality myself in combination with a fresh installation. If I remember correctly there was a warning about incompatibility but it was still possible to install any version. HACS does use internal caching so this change I made one hour ago will probably not be visible to you.

From my side it would be preferable if I could mark a required minimum HA version per Alarmo release. That way a user would always see the latest updatable version that matches their HA installation. But I don't believe this is possible in HACS currently.

after that up to you if you want to close this issue.

I think we agree there is not really any bug being discussed here but an incompatibility issue. I will close this since there will not be any follow up (you know what to do if you want to use 1.9.14 without errors). A closed issue still allows for further discussion.

nielsfaber avatar Feb 06 '24 19:02 nielsfaber

From my side it would be preferable if I could mark a required minimum HA version per Alarmo release. That way a user would always see the latest updatable version that matches their HA installation. But I don't believe this is possible in HACS currently.

Oh I was expecting (hoping) this is the case as I did not have a deeper look at the HACS developer docs. What a pity if this is not the case :-( That's quite limitating if you can only set the minimum HA version for the WHOLE integration. That indeed has downsides like new users not being able to use Alarmo at all, because they can't install a former version which would work just fine with their HA version. Are you able to spot the right repo at https://github.com/hacs and would you create a feature request for this must-have feature?

Currently I still see the update unfortunately. No HA restart yet. Hope it will disappear - as there's also no "hide updates" function in HACS like it is in HA Core. So starring at the update I can (should) not install while HA is not up to date is a bit hmm.

grafik

But yes, this issue is about update dependency management, not a functional Alarmo integration issue itself, you're absolutely right.

bcutter avatar Feb 07 '24 15:02 bcutter

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

github-actions[bot] avatar Mar 09 '24 00:03 github-actions[bot]

Please note: HA 2024.1.6 with Alarmo 1.9.14 and Alarmo Card 1.5.2 still gives a non-functional state (nothing in HA log, but the GUI is not working...)

grafik

I guess this is now an alarmo-card issue, right?

bcutter avatar Aug 01 '24 16:08 bcutter