Skip to content
This repository has been archived by the owner on Apr 23, 2024. It is now read-only.

Misnaming in enum #112

Closed
isabellaalstrom opened this issue Aug 14, 2020 · 0 comments · Fixed by #113
Closed

Misnaming in enum #112

isabellaalstrom opened this issue Aug 14, 2020 · 0 comments · Fixed by #113

Comments

@isabellaalstrom
Copy link
Contributor

isabellaalstrom commented Aug 14, 2020

Should be who-least-did-first

WHO_DID_LEAST_DID_FIRST = 'who-did-least-did-first'

Traceback (most recent call last):
File "/config/custom_components/grocy/init.py", line 227, in async_update_chores
] = await self.hass.async_add_executor_job(wrapper)
File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/grocy/init.py", line 223, in wrapper
return self.client.chores(True)
File "/usr/local/lib/python3.8/site-packages/pygrocy/grocy.py", line 461, in chores
chore.get_details(self._api_client)
File "/usr/local/lib/python3.8/site-packages/pygrocy/grocy.py", line 243, in get_details
self._init_from_ChoreDetailsResponse(details)
File "/usr/local/lib/python3.8/site-packages/pygrocy/grocy.py", line 221, in _init_from_ChoreDetailsResponse
self._assignment_type = Chore.AssignmentType(chore_data.assignment_type)
File "/usr/local/lib/python3.8/enum.py", line 304, in call
return cls.new(cls, value)
File "/usr/local/lib/python3.8/enum.py", line 595, in new
raise exc
File "/usr/local/lib/python3.8/enum.py", line 579, in new
result = cls.missing(value)
File "/usr/local/lib/python3.8/enum.py", line 608, in missing
raise ValueError("%r is not a valid %s" % (value, cls.name))
ValueError: 'who-least-did-first' is not a valid AssignmentType

SebRut added a commit that referenced this issue Aug 14, 2020
Signed-off-by: Sebastian Rutofski <sebastian.rutofski@gmail.com>
@SebRut SebRut mentioned this issue Aug 14, 2020
SebRut added a commit that referenced this issue Aug 14, 2020
Signed-off-by: Sebastian Rutofski <sebastian.rutofski@gmail.com>
SebRut added a commit that referenced this issue Aug 14, 2020
* fix #112
* add pre commit config
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant