jlvcm / ha-actualbudget

Actual Budget integration for Home Assistant
23 stars 3 forks source link

Only Accounts seem to load #8

Open s1mpleman opened 3 hours ago

s1mpleman commented 3 hours ago

Just noticed this was different than when I tried originally.

Currently I get my 3 bank accounts loaded and that's it. The only error I seemed to have is the one below.

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 361, in _async_setup_platform
    await asyncio.shield(awaitable)
  File "/config/custom_components/actualbudget/sensor.py", line 81, in async_setup_entry
    budgets = await api.get_budgets()
              ^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/actualbudget/actualbudget.py", line 89, in get_budgets
    return await self.hass.async_add_executor_job(self.get_budgets_sync)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/actualbudget/actualbudget.py", line 102, in get_budgets_sync
    category = str(budget_raw.category_item.name)
                   ^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'ZeroBudgets' object has no attribute 'category_item'. Did you mean: 'category_id'?
jlvcm commented 3 hours ago

changed to see if it fixes for you, if it doesn't, let me know and later today if i have time i'll debug and test correctly

sorry 🙏

s1mpleman commented 3 hours ago

Absolutely nothing to be sorry about!

Unknown error updating data from ActualBudget API to budget Treats. get_budget() missing 1 required positional argument: 'category'
Unknown error updating data from ActualBudget API to budget Water. get_budget() missing 1 required positional argument: 'category'
Unknown error updating data from ActualBudget API to budget Council Tax. get_budget() missing 1 required positional argument: 'category'
Unknown error updating data from ActualBudget API to budget Electricity and Gas. get_budget() missing 1 required positional argument: 'category'
Unknown error updating data from ActualBudget API to budget Baby Items. get_budget() missing 1 required positional argument: 'category'
Traceback (most recent call last):
  File "/config/custom_components/actualbudget/sensor.py", line 276, in async_update
    budget = await api.get_budget(self._name)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/actualbudget/actualbudget.py", line 117, in get_budget
    return await self.hass.async_add_executor_job(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/actualbudget/actualbudget.py", line 133, in get_budget_sync
    budgets_raw = get_budget(actual.session, budget_name)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: get_budget() missing 1 required positional argument: 'category'

Close but no cigar! They have loaded now, but are all unavailable.

No worries, thank you for trying!