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

Get this issues after pushing track on custom chores card #133

Closed
adtwomey opened this issue Apr 15, 2021 · 7 comments
Closed

Get this issues after pushing track on custom chores card #133

adtwomey opened this issue Apr 15, 2021 · 7 comments

Comments

@adtwomey
Copy link

Get this issues after pushing track.

Use Home Assistant Core 2021.4.4
Grocy custom component 3.0.5
Grocy Docker Version 3.0.1
Lovelace Grocy Chores Card 2.1.0

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 143, in handle_call_service await hass.services.async_call( File "/usr/src/homeassistant/homeassistant/core.py", line 1480, in async_call task.result() File "/usr/src/homeassistant/homeassistant/core.py", line 1515, in _execute_service await handler.job.target(service_call) File "/config/custom_components/grocy/services.py", line 105, in async_call_grocy_service await async_execute_chore_service(hass, coordinator, service_data) File "/config/custom_components/grocy/services.py", line 207, in async_execute_chore_service await 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/services.py", line 205, in wrapper coordinator.api.execute_chore(chore_id, done_by, tracked_time) File "/usr/local/lib/python3.8/site-packages/pygrocy/grocy.py", line 107, in execute_chore return self._api_client.execute_chore(chore_id, done_by, tracked_time) File "/usr/local/lib/python3.8/site-packages/pygrocy/grocy_api_client.py", line 633, in execute_chore return self._do_post_request(f"chores/{chore_id}/execute", data) File "/usr/local/lib/python3.8/site-packages/pygrocy/grocy_api_client.py", line 565, in _do_post_request raise GrocyError(resp) pygrocy.errors.grocy_error.GrocyError: <Response

@isabellaalstrom
Copy link
Collaborator

Are you trying to track with another user id than the one who created the api key?

@adtwomey
Copy link
Author

Are you trying to track with another user id than the one who created the api key?

Have try with one user have not worked. Have realy to forum last night. With pictures...

@adtwomey
Copy link
Author

Also I use home assistant cloud if this does any think different...

@isabellaalstrom
Copy link
Collaborator

isabellaalstrom commented Apr 28, 2021

Cloud should not make a difference.
Try calling this in your browser: http://192.168.0.16:9192/api/users and see what id the user Aaron has

@isabellaalstrom
Copy link
Collaborator

I have added instructions in the readme. Try these and get back to me. https://github.com/isabellaalstrom/lovelace-grocy-chores-card#user_id

@adtwomey
Copy link
Author

20210428_190451
I am user ID no. 2... Have change card to suit and now working... Thanks... P.S is there a way to press the track button in a Automations as an Actions.... It's going to be for an notification to the Android app....

@isabellaalstrom
Copy link
Collaborator

Use the service call, like this:

service: grocy.execute_chore
data:
  chore_id: 1
  done_by: 2

Chore id you can get from the entity attributes and done by is your user id.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants