theneweinstein / somneo

Home Assistant custom component for Philips Someo
32 stars 18 forks source link

Error migrating entry Somneo for somneo #29

Closed idl0r closed 1 year ago

idl0r commented 1 year ago
2023-02-18 16:21:25.242 ERROR (MainThread) [homeassistant.config_entries] Error migrating entry Somneo for somneo
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 623, in async_migrate
    result = await component.async_migrate_entry(hass, self)
  File "/config/custom_components/somneo/__init__.py", line 61, in async_migrate_entry
    new.append({'use_session': True})
AttributeError: 'dict' object has no attribute 'append'

That's what I get when updating my somneo to 868a4ea3552253dff78dc947e49cc7c387c293a6. Rolling back to 66b045cd2107bf293296d03e6d22574ccfdd02f9 and it works fine again

theneweinstein commented 1 year ago

Yes, that is correct, in that commit a bug was introduced. That is already fixed in newer versions. You have to update to the latest versions v3.1.4 (or commit 45f3225).

idl0r commented 1 year ago

That error is with master being on 45f3225058ff68f1bae72226a5671d1def69ffc8

theneweinstein commented 1 year ago

OK. In v3.1.4 the migrate function was missing (I accidentally re-released an older version). This should be fixed in v3.1.5. However, if you run on master, the migrate functions should be there. Could you check in /config/custom_components/somneo/__init__.py if on line 54 async_migrate_entry is defined? If not try to redownload the master (or v3.1.5).

idl0r commented 1 year ago

Yeah, it's there but still get that error on current master. Just pulled again. I rsync (including --delete) the entire custom_components/somneo over to /config/custom_components so it's usually 1:1 the one that's in git.

GH2user commented 1 year ago

I get the same error as above. Just upgraded to the 3.1.5 version a few minutes ago.

Logger: homeassistant.config_entries
Source: custom_components/somneo/__init__.py:61
Integration: Philips Somneo ([documentation](https://github.com/theneweinstein/somneo), [issues](https://github.com/theneweinstein/somneo/issues))
First occurred: 23:11:36 (1 occurrences)
Last logged: 23:11:36

Error migrating entry Somneo for somneo
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 623, in async_migrate
    result = await component.async_migrate_entry(hass, self)
  File "/config/custom_components/somneo/__init__.py", line 61, in async_migrate_entry
    new.append({'use_session': True})
AttributeError: 'dict' object has no attribute 'append'
theneweinstein commented 1 year ago

Thanks, I think I now know what goes wrong. I forget to push my last commit with a bugfix. I will fix it this evening.

idl0r commented 1 year ago

b9720177dbc8c1a58046037b00d4383f58e7375c looks good. Thanks!

theneweinstein commented 1 year ago

I created a new release v3.1.6 that should solve the problem.

GH2user commented 1 year ago

that fixed it indeed, thanks.