custom-components / grocy

Custom Grocy integration for Home Assistant
Apache License 2.0
162 stars 50 forks source link

PeriodType "hourly" not supported for chores #205

Closed andreheuer closed 2 years ago

andreheuer commented 2 years ago

Describe the bug After adding the integration and activating chores related entities, an error is logged in home assistant that the update of the entities failed due to an invalid PeriodType:

2022-04-12 11:19:55 ERROR (MainThread) [custom_components.grocy] Update of Overdue_chores failed with 'hourly' is not a valid PeriodType
2022-04-12 11:19:58 ERROR (MainThread) [custom_components.grocy] Update of Chores failed with 'hourly' is not a valid PeriodType

The period type hourly was newly introduced to grocy: https://grocy.info/changelog#:~:text=by%20the%20suffix)-,Chores,-Chore%20schedules%20can

Expected behavior Entities are initialized and showing chores and overdue chores.

To Reproduce Steps to reproduce the behavior:

  1. Add chore in grocy with an hour based scheduling (e.g. every 24 hours)
  2. Activate integration
  3. Activate chores entities

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?

What is your installed versions of Home Assistant, Grocy and this integration? Grocy: 3.3.0 Home Assistant: 2022.4.2 Grocy inegration: 4.18

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) n/a

Additional context n/a

andreheuer commented 2 years ago

I had a deeper look by myself into this issue and seems to be an issue with pygrocy, as pygrocy does not suppoer hourly chores (yet)

BenoitAnastay commented 2 years ago

There is also an issue with adaptatives ones

Update of Overdue_chores failed with 'adaptive' is not a valid PeriodType

AlesZurek commented 2 years ago

I just want to inform that the mentioned Pull Request has been merged and pygrocy version 1.2 is available with that fix