soloam / ha-fireflyiii-integration

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

Some errors when adding integration #2

Closed poudenes closed 2 months ago

poudenes commented 2 months ago

When only add "Returning Bills"

Bills show some entities

2024-04-27 10:02:59.025 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up fireflyiii_integration platform for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 356, in _async_setup_platform
    await asyncio.shield(awaitable)
  File "/config/custom_components/fireflyiii_integration/sensor.py", line 48, in async_setup_entry
    for account_id in coordinator.api_data.accounts:
TypeError: 'FireflyiiiObjectEmpty' object is not iterable

When only add "Piggy Banks"

Only show 1 entity: Server Status

2024-04-27 10:05:03.044 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up fireflyiii_integration platform for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 356, in _async_setup_platform
    await asyncio.shield(awaitable)
  File "/config/custom_components/fireflyiii_integration/sensor.py", line 48, in async_setup_entry
    for account_id in coordinator.api_data.accounts:
TypeError: 'FireflyiiiObjectEmpty' object is not iterable
2024-04-27 10:05:03.047 ERROR (MainThread) [homeassistant.components.calendar] Error while setting up fireflyiii_integration platform for calendar
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 356, in _async_setup_platform
    await asyncio.shield(awaitable)
  File "/config/custom_components/fireflyiii_integration/calendar.py", line 47, in async_setup_entry
    for bill_id in coordinator.api_data.bills:
TypeError: 'FireflyiiiObjectEmpty' object is not iterable

When only add "Accounts":

Only show 1 entity: Server Status

2024-04-27 10:06:41.870 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up fireflyiii_integration platform for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 356, in _async_setup_platform
    await asyncio.shield(awaitable)
  File "/config/custom_components/fireflyiii_integration/sensor.py", line 57, in async_setup_entry
    for category_id in coordinator.api_data.categories:
TypeError: 'FireflyiiiObjectEmpty' object is not iterable
2024-04-27 10:06:41.872 ERROR (MainThread) [homeassistant.components.calendar] Error while setting up fireflyiii_integration platform for calendar
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 356, in _async_setup_platform
    await asyncio.shield(awaitable)
  File "/config/custom_components/fireflyiii_integration/calendar.py", line 47, in async_setup_entry
    for bill_id in coordinator.api_data.bills:
TypeError: 'FireflyiiiObjectEmpty' object is not iterable

When only add "Category":

Only show 1 entity: Server Status

2024-04-27 10:07:37.817 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up fireflyiii_integration platform for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 356, in _async_setup_platform
    await asyncio.shield(awaitable)
  File "/config/custom_components/fireflyiii_integration/sensor.py", line 48, in async_setup_entry
    for account_id in coordinator.api_data.accounts:
TypeError: 'FireflyiiiObjectEmpty' object is not iterable
2024-04-27 10:07:37.820 ERROR (MainThread) [homeassistant.components.calendar] Error while setting up fireflyiii_integration platform for calendar
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 356, in _async_setup_platform
    await asyncio.shield(awaitable)
  File "/config/custom_components/fireflyiii_integration/calendar.py", line 47, in async_setup_entry
    for bill_id in coordinator.api_data.bills:
TypeError: 'FireflyiiiObjectEmpty' object is not iterable
soloam commented 2 months ago

Thank you for the feedback! I'll solve that in the next release

soloam commented 2 months ago

Fixed tks @poudenes