dontinelli / fyta-custom_component Goto Github PK
View Code? Open in Web Editor NEWHome Assistant integration for FYTA plant sensors, configured as custom component
License: GNU General Public License v3.0
Home Assistant integration for FYTA plant sensors, configured as custom component
License: GNU General Public License v3.0
See #17
This exception occurs randomly.
Occurs randomly
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
No response
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 |
logged_in | false |
---|---|
can_reach_cert_server | ok |
can_reach_cloud_auth | ok |
can_reach_cloud | ok |
dashboards | 1 |
---|---|
resources | 0 |
mode | auto-gen |
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 |
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
...
See above
No response
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 |
logged_in | false |
---|---|
can_reach_cert_server | ok |
can_reach_cloud_auth | ok |
can_reach_cloud | ok |
dashboards | 1 |
---|---|
resources | 0 |
mode | auto-gen |
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 |
The integration crashes once in a while
I can´t say when it happens. It just a appears in the log.
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'
When I start the integration process, the following error message appears after the update (in the previous version, the config_flow.py ran fine.)
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.