Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error since updating to 2022.2.x #354

Closed
3 tasks done
Kanga-Who opened this issue Feb 12, 2022 · 11 comments
Closed
3 tasks done

Error since updating to 2022.2.x #354

Kanga-Who opened this issue Feb 12, 2022 · 11 comments
Labels
bug Something isn't working

Comments

@Kanga-Who
Copy link

Before you submit a new bug report, please check that

Describe the bug

Restart Home Assistant: Error executing script. Error for call_service at pos 1: The system cannot restart because the configuration is not valid: Invalid config for [garbage_collection]: Not a list for dictionary value @ data['garbage_collection']['sensors'][0]['collection_days']. Got 'mon'. (See /config/configuration.yaml, line 115). 

Configuration

garbage_collection:
  sensors:
    - name: General Waste
      frequency: "weekly"
      collection_days: mon
    - name: Recycling
      frequency: "odd-weeks"
      collection_days: mon
    - name: Green Waste
      frequency: "even-weeks"
      collection_days: mon


### Debug logs

```shell
Unable to get debug logs as I can not restart HA with the integration enabled.
@Kanga-Who Kanga-Who added the bug Something isn't working label Feb 12, 2022
@bruxy70
Copy link
Owner

bruxy70 commented Feb 12, 2022

Can you please help me testing the fix? Can you take the __init__.py file from here put it in the custom_components/garbage collection, restart and see if it helps. The collection days is supposed to be a list, not text, but it was a valid option before, so I am trying to support that in the migration script. Thanks!

@jgronowski
Copy link

jgronowski commented Feb 12, 2022

@bruxy70 i took this file and put in to the mentioned custom_components, but the error is the same.

Logger: homeassistant.setup
Source: setup.py:154
First occurred: 13:06:15 (1 occurrences)
Last logged: 13:06:15

Setup failed for garbage_collection: Invalid config.
Invalid config for [garbage_collection]: Not a list for dictionary value @ data['garbage_collection']['sensors'][0]['collection_days']. Got 'mon'. (See /config/configuration.yaml, line 32).

@tiptap85
Copy link

tiptap85 commented Feb 12, 2022

Can you please help me testing the fix? Can you take the __init__.py file from here put it in the custom_components/garbage collection, restart and see if it helps. The collection days is supposed to be a list, not text, but it was a valid option before, so I am trying to support that in the migration script. Thanks!

Same error for me, after changing the init.py file and restarting Home Assistant I got this error: "Component error: garbage_collection - Exception importing custom_components.garbage_collection"

@bruxy70
Copy link
Owner

bruxy70 commented Feb 12, 2022

Ok, can you try again pls? I apreciate your help, it will help others with importing the legacy config. Thanks!

@tiptap85
Copy link

tiptap85 commented Feb 12, 2022

Ok, can you try again pls? I apreciate your help, it will help others with importing the legacy config. Thanks!

Thank you for your quick help. I have tried, but i got the same error...

@bruxy70
Copy link
Owner

bruxy70 commented Feb 12, 2022

Do not know. I have cleared all my config and configured yours, and it imported fine:
image
I just made a release with the modified init file, so please upgrade and restart if it helps.
Did you check in the Integrations page if the devices are still missing?

@jgronowski
Copy link

@bruxy70 problem solved. The latest commit fix the issue.

@bruxy70 bruxy70 closed this as completed Feb 12, 2022
@Kanga-Who
Copy link
Author

Kanga-Who commented Feb 13, 2022

I'm still getting the same problem on 4.4.5, can not restart HA. Is my config incorrect?

Restart Home Assistant: Error executing script. Error for call_service at pos 1: The system cannot restart because the configuration is not valid: Invalid config for [garbage_collection]: Not a list for dictionary value @ data['garbage_collection']['sensors'][0]['collection_days']. Got 'mon'. (See /config/configuration.yaml, line 115). 

EDIT: Uninstalled and re-installed the add-on, now working. Weird.

Thanks for the updates 👍

@bruxy70
Copy link
Owner

bruxy70 commented Feb 13, 2022

@Kanga-Who , I do not know what is your config, I do not know what do you mean by weird, and I do not know what add-on you re-installed.

@Kanga-Who
Copy link
Author

@Kanga-Who , I do not know what is your config, I do not know what do you mean by weird, and I do not know what add-on you re-installed.

My config was in the OP.

It was weird that I was still getting an error after updating, but uninstalling this add-on and reinstalling it fixed the issue - as stated in my last post.

@bruxy70
Copy link
Owner

bruxy70 commented Feb 13, 2022

Ok, sorry, I thought that one was already resolved, did not notice it was someone else :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants