Giter VIP home page Giter VIP logo

Comments (8)

SebRut avatar SebRut commented on July 30, 2024 1

@isabellaalstrom i published a new release v0.25.0 which made the lib compatible to grocy 3.0.0+ as far as I know, could you check it out maybe?
Also it might make sense to add some sort of information text about the "new" incompability with grocy < 3.0.0 to the integration.

from pygrocy.

SebRut avatar SebRut commented on July 30, 2024

Hey! Do you know what things are broken? It seems like the chores are still working, so stock and products?

from pygrocy.

isabellaalstrom avatar isabellaalstrom commented on July 30, 2024

Stock seems to work, but I would say products have issues.
See this: custom-components/grocy#114

Edit: Yeah, my stock-sensor is working correctly, so it seems to be the binary sensors.

from pygrocy.

isabellaalstrom avatar isabellaalstrom commented on July 30, 2024

Yeah! I will look at this tomorrow. 👌

from pygrocy.

isabellaalstrom avatar isabellaalstrom commented on July 30, 2024

Updated to 0.26.0 in my local env and now I get this error. I don't use barcodes, and it seems it expects them? Nothing is updating as it is now.

Source: custom_components/grocy/entity.py:133
First occurred: 1:07:09 PM (21 occurrences)
Last logged: 1:21:10 PM

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 124, in _handle_refresh_interval
    await self.async_refresh()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 198, in async_refresh
    update_callback()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 296, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 323, in _async_write_ha_state
    attr.update(self.device_state_attributes or {})
  File "/config/custom_components/grocy/entity.py", line 133, in device_state_attributes
    return {"products": [x.as_dict() for x in self.entity_data]}
  File "/config/custom_components/grocy/entity.py", line 133, in <listcomp>
    return {"products": [x.as_dict() for x in self.entity_data]}
  File "/usr/local/lib/python3.8/site-packages/pygrocy/base.py", line 10, in as_dict
    return {k: get_val(getattr(self, k)) for k, v in self.__class__.__dict__.items() if isinstance(v, property)}
  File "/usr/local/lib/python3.8/site-packages/pygrocy/base.py", line 10, in <dictcomp>
    return {k: get_val(getattr(self, k)) for k, v in self.__class__.__dict__.items() if isinstance(v, property)}
  File "/usr/local/lib/python3.8/site-packages/pygrocy/data_models/product.py", line 89, in barcodes
    return [barcode.barcode for barcode in self.product_barcodes]
TypeError: 'NoneType' object is not iterable

from pygrocy.

SebRut avatar SebRut commented on July 30, 2024

@isabellaalstrom I (hopefully) fixed your issue and another one in a new 0.27.0 version :)

from pygrocy.

isabellaalstrom avatar isabellaalstrom commented on July 30, 2024

Will check at once!

from pygrocy.

isabellaalstrom avatar isabellaalstrom commented on July 30, 2024

All sensors and binary sensors are now working! 🎉

from pygrocy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.