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

Add undocumented api call for rescheduling chores #288

Open
Pebkac03 opened this issue Sep 5, 2023 · 1 comment
Open

Add undocumented api call for rescheduling chores #288

Pebkac03 opened this issue Sep 5, 2023 · 1 comment

Comments

@Pebkac03
Copy link

Pebkac03 commented Sep 5, 2023

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/

@droans
Copy link

droans commented Jan 5, 2024

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'

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