custom-components / grocy

Custom Grocy integration for Home Assistant
Apache License 2.0
156 stars 47 forks source link

Add support for skipping chores #224

Closed szerencl closed 2 years ago

szerencl commented 2 years ago

Describe the bug As of grocy v3.2.0, skipping chores is possible, but this feature is not yet supported by the integration.

Expected behavior Calling the execute_chore service with skipped set to true should postpone the chore execution to the next scheduled date, without logging it as 'Done'. API available here.

service: grocy.execute_chore
data:
  chore_id: '0'
  done_by: '0'
  skipped: true

To Reproduce Steps to reproduce the behavior:

  1. Go to Home Assistant developer tools - services.
  2. Select Grocy: Execute Chore service
  3. Add skipped: true to data in YAML mode
  4. Observe an 'extra keys not allowed' error.

General information to help debugging:

What sensors do you have enabled? Are they working and/or what state are they in? Do you have the corresponding functions enabled in Grocy? sensor.grocy_chores binary_sensor.grocy_overdue_chores Chores activated in grocy

What is your installed versions of Home Assistant, Grocy and this integration? Grocy: 3.3.0 Home Assistant Core: 2022.5.0 Grocy inegration: v4.3.3

How do you have Grocy installed? Add-on or external? External via docker

Have you added debugging to the log, and what does the log say? N/A

JSON service data (if related to using a service)

{
  "tracked_time": "2022-06-02T12:15:37.917Z",
  "chore_id": 0,
  "done_by": 0,
  "skipped": true
}
marcelvriend commented 2 years ago

Waits for upstream PR https://github.com/SebRut/pygrocy/pull/240.