dontinelli / fyta-custom_component

Home Assistant integration for FYTA plant sensors, configured as custom component
GNU General Public License v3.0
11 stars 1 forks source link

Fyta integration often causes errors #64

Closed Damrak2022 closed 2 weeks ago

Damrak2022 commented 3 weeks ago

System Health details

Sory, i don't find it.

Checklist

Describe the issue

Sorry for using Google Translate, but my English is really bad these days. My Fyta integration often gives me this error and I don't know why or how to fix it. Everything is displayed correctly in the Fyta app.

Bildschirmfoto 2024-09-26 um 09 21 42

Reproduction steps

1.I don't know what to write here, because sometimes the integration works and sometimes the error occurs again, as can be seen in the screenshot above.2. 3. ...

Debug logs

session (None)
2024-09-26 11:04:11.909 ERROR (MainThread) [homeassistant.components.fyta.coordinator] Unexpected error fetching FYTA Coordinator data
Traceback (most recent call last):
  File "<string>", line 33, in __mashumaro_from_dict__
  File "/usr/local/lib/python3.12/enum.py", line 757, in __call__
    return cls.__new__(cls, value)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/enum.py", line 1171, in __new__
    raise ve_exc
ValueError: None is not a valid PlantMeasurementStatus

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 354, in _async_refresh
    self.data = await self._async_update_data()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/fyta/coordinator.py", line 58, in _async_update_data
    return await self.fyta.update_all_plants()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/fyta_cli/fyta_connector.py", line 68, in update_all_plants
    current_plant: Plant | None = await self.update_plant_data(plant)
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/fyta_cli/fyta_connector.py", line 86, in update_plant_data
    current_plant = Plant.from_dict(plant_data)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<string>", line 35, in __mashumaro_from_dict__
mashumaro.exceptions.InvalidFieldValue: Field "light_status" of type PlantMeasurementStatus in Plant has invalid value None
2024-09-26 11:04:15.103 ERROR (MainThread) [homeassistant] Error doing job: Unclosed client session (None)
2024-09-26 11:04:15.108 ERROR (MainThread) [homeassistant] Error doing job: Unclosed connector (None)
2024-09-26 11:04:33.671 ERROR (Recorder) [homeassistant] Error doing job: Unclosed client session (None)

Diagnostics dump

No response

dontinelli commented 2 weeks ago

I updated fyta_cli and the respective dependency in the custom component. Can you please check if the error persists or is fixed?

Damrak2022 commented 2 weeks ago

Everything looks perfect at the moment. However, I mostly had the problem when I added a new beam. I will be adding the next beam soon.

Sorry for using Google Translate, but my English is not the best anymore.

Best wishes, Andy

Mit freundlichen Grüßen

Andreas Wahn

Bitte denken Sie an unsere Umwelt und ob es notwendig ist diese Email auszudrucken.

Mit What3Words finden Sie jede Adresse punktgenau:

https://w3w.co/teppiche.pflegen.angelegt

Mörfelder Landstraße 210

60598 Frankfurt

Tel: +49 69 872 00 878 Mobil: +49 157 3963 4367

Am 5. Okt. 2024, 22:28 +0200 schrieb dontinelli @.***>:

I updated fyta_cli and the respective dependency in the custom component. Can you please check if the error persists or is fixed? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

dontinelli commented 2 weeks ago

Resolved with https://github.com/dontinelli/fyta-custom_component/commit/6bf12a1fc34fec3082f3f57f0d79df0a4458d174

dontinelli commented 2 weeks ago

Everything looks perfect at the moment. However, I mostly had the problem when I added a new beam. I will be adding the next beam soon. Sorry for using Google Translate, but my English is not the best anymore. Best wishes, Andy Mit freundlichen Grüßen Andreas Wahn Bitte denken Sie an unsere Umwelt und ob es notwendig ist diese Email auszudrucken. Mit What3Words finden Sie jede Adresse punktgenau: https://w3w.co/teppiche.pflegen.angelegt Mörfelder Landstraße 210 60598 Frankfurt Tel: +49 69 872 00 878 Mobil: +49 157 3963 4367 Am 5. Okt. 2024, 22:28 +0200 schrieb dontinelli @.>: I updated fyta_cli and the respective dependency in the custom component. Can you please check if the error persists or is fixed? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.>

I close the issue. Please open new issue, in case there should be a problem while adding a new sensor.