Giter Site home page Giter Site logo

Comments (4)

ad-ha avatar ad-ha commented on July 22, 2024

Buenas,

A mi me pasa lo mismo. Yo tengo estos errores en el Log:

Logger: homeassistant.components.sensor
Source: custom_components/repsolluzygas/repsol_api.py:96
Integration: Sensor (documentation, issues)

repsolluzygas: Error on device update!
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 431, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 684, in async_device_update
    await task
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/repsolluzygas/sensor.py", line 73, in update
    self.client.update()
  File "/config/custom_components/repsolluzygas/repsol_api.py", line 166, in update
    contracts = self.get_contracts(uid, signature, tstamp)
  File "/config/custom_components/repsolluzygas/repsol_api.py", line 96, in get_contracts
    info['product_name'] = contract['commercialName']
KeyError: 'commercialName'

Y luego este otro:

Logger: homeassistant.components.sensor
Source: custom_components/repsolluzygas/sensor.py:61
Integration: Sensor (documentation, issues)

Error adding entities for domain sensor with platform repsolluzygas
Error while setting up repsolluzygas platform for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 382, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 613, in _async_add_entity
    await entity.add_to_platform_finish()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 748, in add_to_platform_finish
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 505, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 538, in _async_write_ha_state
    state = self._stringify_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 511, in _stringify_state
    if (state := self.state) is None:
  File "/config/custom_components/repsolluzygas/sensor.py", line 61, in state
    data = self.client.data.get(self.variable, 0)
AttributeError: 'RepsolLuzYGasSensor' object has no attribute 'data'

from repsolluzygas.

bzzoiro avatar bzzoiro commented on July 22, 2024

Thanks for the feedback. Now that I'm on Holidays I will double check it and bring it on.

from repsolluzygas.

bzzoiro avatar bzzoiro commented on July 22, 2024

This issue was fixed with release 1.1.1

from repsolluzygas.

ad-ha avatar ad-ha commented on July 22, 2024

This issue was fixed with release 1.1.1

Buenas. Ya funciona correctamente. Gracias por la rápida corrección.

from repsolluzygas.

Related Issues (16)

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.