Git Product home page Git Product logo

fyta-custom_component's People

Contributors

dependabot[bot] avatar dontinelli avatar jangiese avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

jangiese

fyta-custom_component's Issues

Unexpected error fetching FYTA Coordinator data: cannot access local variable 'msg' where it is not associated with a value

System Health details

See #17

Checklist

  • I have enabled debug logging for my installation.
  • I have filled out the issue template to the best of my ability.
  • This issue only contains 1 issue (if you have multiple issues, open one issue for each issue).
  • This issue is not a duplicate issue of any previous issues..

Describe the issue

This exception occurs randomly.

Reproduction steps

Occurs randomly

Debug logs

2024-03-26 01:23:56.167 ERROR (MainThread) [custom_components.fyta.coordinator] Unexpected error fetching FYTA Coordinator data: cannot access local variable 'msg' where it is not associated with a value
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 313, in _async_refresh
    self.data = await self._async_update_data()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/fyta/coordinator.py", line 46, in _async_update_data
    data = await self.fyta.update_all_plants()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/fyta_cli/fyta_connector.py", line 70, in update_all_plants
    plant_list = await self.update_plant_list()
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/fyta_cli/fyta_connector.py", line 61, in update_plant_list
    self.plant_list = await self.client.get_plants()
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/fyta_cli/fyta_client.py", line 122, in get_plants
    msg,
    ^^^
UnboundLocalError: cannot access local variable 'msg' where it is not associated with a value

Diagnostics dump

No response

Componente crashes after installation

System Health details

System Information

version core-2024.1.5
installation_type Home Assistant Container
dev false
hassio false
docker true
user root
virtualenv false
python_version 3.11.6
os_name Linux
os_version 6.1.0-rpi7-rpi-v8
arch aarch64
timezone Europe/Berlin
config_dir /config
Home Assistant Cloud
logged_in false
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
Dashboards
dashboards 1
resources 0
mode auto-gen
Recorder
oldest_recorder_run 4. März 2024 um 19:07
current_recorder_run 11. März 2024 um 19:27
estimated_db_size 10.54 MiB
database_engine sqlite
database_version 3.41.2

Checklist

  • I have enabled debug logging for my installation.
  • I have filled out the issue template to the best of my ability.
  • This issue only contains 1 issue (if you have multiple issues, open one issue for each issue).
  • This issue is not a duplicate issue of any previous issues..

Describe the issue

After installing the integration I get an error in the integration. The log shows:
2024-03-11 19:39:02.569 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry [hidden for privacy] for fyta
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 406, in async_setup
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/fyta/init.py", line 41, in async_setup_entry
expiration: datetime | None = (datetime.fromisoformat(entry.data.get("expiration")).astimezone(ZoneInfo(tz)) if "expiration" in entry.data else None)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: fromisoformat: argument must be str

Reproduction steps

...

Debug logs

See above

Diagnostics dump

No response

Unexpected error fetching FYTA Coordinator data: 'plant'

System Health details

System Information

version core-2024.2.5
installation_type Home Assistant Container
dev false
hassio false
docker true
user root
virtualenv false
python_version 3.12.1
os_name Linux
os_version 6.1.21-v7+
arch armv7l
timezone Europe/Berlin
config_dir /config
Home Assistant Cloud
logged_in false
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
Dashboards
dashboards 1
resources 0
mode auto-gen
Recorder
oldest_recorder_run 23. März 2024 um 11:46
current_recorder_run 25. März 2024 um 07:24
estimated_db_size 14.31 MiB
database_engine sqlite
database_version 3.44.2

Checklist

  • I have enabled debug logging for my installation.
  • I have filled out the issue template to the best of my ability.
  • This issue only contains 1 issue (if you have multiple issues, open one issue for each issue).
  • This issue is not a duplicate issue of any previous issues..

Describe the issue

The integration crashes once in a while

Reproduction steps

I can´t say when it happens. It just a appears in the log.

Debug logs

2024-03-25 11:42:28.976 ERROR (MainThread) [custom_components.fyta.coordinator] Unexpected error fetching FYTA Coordinator data: 'plant'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 313, in _async_refresh
    self.data = await self._async_update_data()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/fyta/coordinator.py", line 46, in _async_update_data
    data = await self.fyta.update_all_plants()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/fyta_cli/fyta_connector.py", line 73, in update_all_plants
    current_plant = await self.update_plant_data(plant)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/fyta_cli/fyta_connector.py", line 85, in update_plant_data
    plant_data: dict = p["plant"]
                       ~^^^^^^^^^
KeyError: 'plant'

Diagnostics dump

home-assistant_fyta_2024-03-25T11-10-30.774Z.log

error during setup

When I start the integration process, the following error message appears after the update (in the previous version, the config_flow.py ran fine.)
Bildschirmfoto 2024-02-17 um 12 48 52

In the previous version, the devices were created cleanly, but no data arrived. I also started writing an integration, but without authentication with user/password. but with bearer token. Data is already arriving there. I couldn't manage to authenticate and renew the token

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.