grocy icon indicating copy to clipboard operation
grocy copied to clipboard

Add undocumented api call for rescheduling chores

Open Pebkac03 opened this issue 1 year ago • 1 comments

I discoverd today that Grocy haven't documented all possible API-calls in their API Browser and found one that is really handy: the ability to reschedule chores. Would be wonderfull to se it added to this integration. Link: https://www.reddit.com/r/grocy/comments/114sca1/tasks_that_consume_products_possible/

Pebkac03 avatar Sep 05 '23 18:09 Pebkac03

You can already accomplish this with grocy.update_generic. Here's an example:

service: grocy.update_generic
data:
  entity_type: chores
  object_id: 20 # Chore ID
  data:
   # Date only
    rescheduled_date: {{ states('input_datetime.chore_reschedule_date') | as_timestamp | timestamp_custom('%Y-%m-%d 00:00:00') }}

   # Date and time
    rescheduled_date: {{ states('input_datetime.chore_reschedule_date') | as_timestamp | timestamp_custom('%Y-%m-%d %H:%M:%S') }} 

   # Manually typed. use 24 hour time
    rescheduled_date: '2024-01-05 15:20:00'

droans avatar Jan 05 '24 13:01 droans