grocy: Chore sensor does not contain user assignments
Describe the bug
The Grocy API supplies next_execution_assigned_to_user_id, but this is not reported by the sensor.
Therefore it cannot be used as an info source for Lovelace Cards etc.
(Grocy Custom Component v. 0.4.0)
To Reproduce Steps to reproduce the behavior:
- Go to ‘HomeAssistant > Development tools > States’
- Select sensor.grocy_chores entity
- Inspect values for chores, see:
- _chore_id: 1
_last_tracked_time: '2020-04-07T00:00:00+00:00'
_next_estimated_execution_time: '2020-04-12T00:00:00+00:00'
_name: Planten watergeven
_last_done_by:
_id: 3
_username: Jannica
_first_name: Janneke
_last_name: ''
_display_name: Janneke
- _chore_id: 2
_last_tracked_time: '2020-04-08T00:00:00+00:00'
_next_estimated_execution_time: '2020-04-09T00:00:00+00:00'
_name: Afwassen
_last_done_by:
_id: 1
_username: admin
_first_name: null
_last_name: null
_display_name: admin
- No entry for
_next_execution_assigned_to_user_idis found.
Expected behavior
next_execution_assigned_to_user_id should also be part of the sensor data.
Are you using HASSIO to run grocy? Yes
configuration.yaml entry
default
Grocy config = default
JSON service data (if related to using a service)
{
}
Additional context Add any other context about the problem here.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 20 (1 by maintainers)
@isabellaalstrom I try to atleast maintain the repo in the sense of reviewing and merging PRs and stuff. Not sure what amount of development will be done by me.
You shouldn’t have to look up the user ID for this as the response includes that information.
The full output of my api call to /api/chores/1 for instance is as below, so you could just reference the “next_execution_assigned_user” right?
I’m basing my assumption on the API spec of the grocy demo instance (https://en.demo.grocy.info/api#/Chores/get_chores__choreId_) which doesn’t include
next_execution_assigned_to_user_id. It shouldn’t be hard to implement either way, I just have to find some time to do it.