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

Getting product by id fails if name_plural is null #293

Open
vorostamas opened this issue Nov 3, 2023 · 0 comments
Open

Getting product by id fails if name_plural is null #293

vorostamas opened this issue Nov 3, 2023 · 0 comments

Comments

@vorostamas
Copy link

Unless all relevant information is provided, I can't help you

Describe the bug
If the plural name is not set in Grocy (which is optional), the product sensors are not working.

Expected behavior
Working product sensors.

To Reproduce
Steps to reproduce the behavior:

  1. Go to /quantityunits
  2. Click on 'Add' button
  3. Type in something in the 'Name in singular form' textbox
  4. Make sure 'Name in plural form' is empty

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?

  • binary_sensor.grocy_expiring_products
  • binary_sensor.grocy_overdue_products

They are in the Unavailable state, enabled in Grocy.

What is your installed versions of Home Assistant, Grocy and this integration?
HA Version: 2023.10.1, Grocy Version 4.0.3, Integration Version: v4.11.1

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

Have you added debugging to the log, and what does the log say?
Error fetching grocy data: Update failed: 2 validation errors for ProductDetailsResponse quantity_unit_stock -> name_plural none is not an allowed value (type=type_error.none.not_allowed) default_quantity_unit_purchase -> name_plural none is not an allowed value (type=type_error.none.not_allowed)

Additional context

This is already done in pygrocy: SebRut/pygrocy#271

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

1 participant