soloam / ha-fireflyiii-integration

FireflyIII Integration for Home Assistant
MIT License
11 stars 0 forks source link

Entities Not Appearing After Setup #25

Closed philidinator closed 1 month ago

philidinator commented 1 month ago

Hello,

First of all, thanks for the awesome integration! I've always managed with the REST API & sensors previously. Then I came across this through the FireFly discussions.

The setup assistant completes successfully, but afterwards no entities appear. The following error is logged:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 315, in _async_refresh
    self.data = await self._async_update_data()
  File "/config/custom_components/fireflyiii_integration/integrations/fireflyiii_coordinator.py", line 257, in _async_update_data
    await data_list.gather()
  File "/config/custom_components/fireflyiii_integration/integrations/fireflyiii_objects.py", line 251, in gather
    result = await gather(*[res for res in self._coroutines])
  File "/config/custom_components/fireflyiii_integration/integrations/fireflyiii.py", line 744, in bills
    if not isinstance(transaction, FireflyiiiTransaction):
UnboundLocalError: cannot access local variable 'transaction' where it is not associated with a value

Any help in resolving this would be greatly appreciated!

Thank you!

soloam commented 1 month ago

This looks like a coding error, i'll look at it and report back, thank you

soloam commented 1 month ago

I found the problem, tks for the report! I'll fix it as quickly as possible! For now, if you you would like to pull other data, try to remove the integration from HA (only HA, not HACS) and when setting up, uncheck Bills!

Also tks for using/testing the integration... Since it's very new, feature requests are welcomed

soloam commented 1 month ago

FIxed with #26 Check release 1.0.1

OvernightPancake commented 1 month ago

I am also facing a similar issue, this time whenever budgets are selected:

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 315, in _async_refresh self.data = await self._async_update_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/fireflyiii_integration/integrations/fireflyiii_coordinator.py", line 257, in _async_update_data await data_list.gather() File "/config/custom_components/fireflyiii_integration/integrations/fireflyiii_objects.py", line 251, in gather result = await gather(*[res for res in self._coroutines]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/fireflyiii_integration/integrations/fireflyiii.py", line 624, in budgets limit_attributes = budget_limit.get("attributes", {}) ^^^^^^^^^^^^ UnboundLocalError: cannot access local variable 'budget_limit' where it is not associated with a value

Otherwise, when I deselect budgets, I do not seem to have any issues.

soloam commented 1 month ago

Tks for the report @OvernightPancake , this is a different problem! I'll fix it as soon as possible!