homeassistant-truenas: [Bug] - Unexpected error fetching TrueNAS data

Describe the issue

Hi at all. I have the same issue today (19 December 2024).

Both systems are on VM (Hyper-V). They are connected with two different virtual connectors, which work on two different LAN cards. From the HA VM I can ping the TrueNAS VM and it works the other way around too. I can connect it with the API Key generated by TrueNAS, but I always get this error.

I saw the proposed solution by modifying the value of line 226 of the coordinator.py file (as was done with the old version 1.3) but it didn’t work. I’ve tried both 1.3 and 1.3.1, but neither seems to work.

How to reproduce the issue

Steps to reproduce the behavior: Try to connect the Hass TrueNAS Integration with the TrueNAS system.

Expected behavior

I can control the TrueNAS information from my Home Assistant system

Screenshots

image

Software versions

Home Assistant version: 2024.12.24 TrueNAS Scale version: 24.10.1 (EletricEel-24.10.1) TrueNAS integration for HA version: 1.3.1

Diagnostics data

Traceback/Error logs

Registratore: custom_components.truenas.coordinator
Fonte: helpers/update_coordinator.py:379
Integrazione: TrueNAS (documentazione, problemi)
Prima occorrenza: 09:34:04 (43 occorrenze)
Ultimo accesso: 14:08:06

Unexpected error fetching TrueNAS data
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 379, in _async_refresh
    self.data = await self._async_update_data()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/truenas/coordinator.py", line 97, in _async_update_data
    await self.hass.async_add_executor_job(self.get_systemstats)
  File "/usr/local/lib/python3.13/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/truenas/coordinator.py", line 445, in get_systemstats
    max(tmp_graph[i]["aggregations"]["mean"].values()), 2
    ~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: max() iterable argument is empty`

Additional context

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 16 (3 by maintainers)

Most upvoted comments

Added my debug logs here since I’m getting the same error. I’m the original poster on #191 but have since switched from TrueNAS Core to Scale, and my error messages now match this issue.

Home Assistant version: 2025.1.4 <-- this is the only slight difference from OP TrueNAS Scale version: 24.10.1 (EletricEel-24.10.1) TrueNAS integration for HA version: 1.3.1

My instance is running in a VM on Xen (XCP-ng)

2025-01-30 17:55:51.995 DEBUG (MainThread) [custom_components.truenas.coordinator] Finished fetching TrueNAS data in 0.097 seconds (success: False)
2025-01-30 17:55:57.063 DEBUG (SyncWorker_5) [custom_components.truenas.api] TrueNAS truenas.lan query: system/info, get, {}
2025-01-30 17:55:57.092 DEBUG (SyncWorker_5) [custom_components.truenas.api] TrueNAS truenas.lan query response: {'version': 'TrueNAS-SCALE-24.10.1', 'buildtime': {'$date': 1734349559000}, 'hostname': 'truenas', 'physmem': 16775700480, 'model': 'AMD Ryzen 7 3700X 8-Core Processor', 'cores': 4, 'physical_cores': 4, 'loadavg': [2.14501953125, 1.73388671875, 0.8916015625], 'uptime': '0:22:10.695548', 'uptime_seconds': 1330.695548288, 'system_serial': '25fc301a-4e29-8d07-fc9d-2da5f155f1df', 'system_product': 'HVM domU', 'system_product_version': '4.17', 'license': None, 'boottime': {'$date': 1738276426000}, 'datetime': {'$date': 1738277757000}, 'timezone': 'America/Los_Angeles', 'system_manufacturer': 'Xen', 'ecc_memory': True}
2025-01-30 17:55:57.092 DEBUG (SyncWorker_5) [custom_components.truenas.apiparser] Processing source [{'version': 'TrueNAS-SCALE-24.10.1', 'buildtime': {'$date': 1734349559000}, 'hostname': 'truenas', 'physmem': 16775700480, 'model': 'AMD Ryzen 7 3700X 8-Core Processor', 'cores': 4, 'physical_cores': 4, 'loadavg': [2.14501953125, 1.73388671875, 0.8916015625], 'uptime': '0:22:10.695548', 'uptime_seconds': 1330.695548288, 'system_serial': '**REDACTED**', 'system_product': 'HVM domU', 'system_product_version': '4.17', 'license': None, 'boottime': {'$date': 1738276426000}, 'datetime': {'$date': 1738277757000}, 'timezone': 'America/Los_Angeles', 'system_manufacturer': 'Xen', 'ecc_memory': True}]
2025-01-30 17:55:57.092 DEBUG (SyncWorker_5) [custom_components.truenas.apiparser] Processing entry {'version': 'TrueNAS-SCALE-24.10.1', 'buildtime': {'$date': 1734349559000}, 'hostname': 'truenas', 'physmem': 16775700480, 'model': 'AMD Ryzen 7 3700X 8-Core Processor', 'cores': 4, 'physical_cores': 4, 'loadavg': [2.14501953125, 1.73388671875, 0.8916015625], 'uptime': '0:22:10.695548', 'uptime_seconds': 1330.695548288, 'system_serial': '**REDACTED**', 'system_product': 'HVM domU', 'system_product_version': '4.17', 'license': None, 'boottime': {'$date': 1738276426000}, 'datetime': {'$date': 1738277757000}, 'timezone': 'America/Los_Angeles', 'system_manufacturer': 'Xen', 'ecc_memory': True}
2025-01-30 17:55:57.092 DEBUG (SyncWorker_5) [custom_components.truenas.api] TrueNAS truenas.lan query: interface, get, {}
2025-01-30 17:55:57.117 DEBUG (SyncWorker_5) [custom_components.truenas.api] TrueNAS truenas.lan query response: [{'id': 'enX1', 'name': 'enX1', 'fake': False, 'type': 'PHYSICAL', 'state': {'name': 'enX1', 'orig_name': 'enX1', 'description': 'enX1', 'mtu': 1500, 'cloned': False, 'flags': ['RUNNING', 'UP', 'BROADCAST', 'MULTICAST', 'LOWER_UP'], 'nd6_flags': ['HOMEADDRESS'], 'capabilities': ['tx-scatter-gather', 'tx-checksum-ipv6', 'tx-generic-segmentation', 'rx-gro', 'tx-tcp-segmentation', 'tx-tcp6-segmentation'], 'link_state': 'LINK_STATE_UP', 'media_type': '', 'media_subtype': '', 'active_media_type': '', 'active_media_subtype': '', 'supported_media': [], 'media_options': None, 'link_address': 'de:60:19:14:8b:58', 'permanent_link_address': 'de:60:19:14:8b:58', 'hardware_link_address': 'de:60:19:14:8b:58', 'aliases': [{'type': 'INET', 'address': '192.168.0.91', 'netmask': 24, 'broadcast': '192.168.0.255'}, {'type': 'INET6', 'address': 'fe80::dc60:19ff:fe14:8b58', 'netmask': 64, 'broadcast': 'fe80::ffff:ffff:ffff:ffff'}, {'type': 'LINK', 'address': 'de:60:19:14:8b:58'}], 'vrrp_config': None, 'rx_queues': 4, 'tx_queues': 4}, 'aliases': [], 'ipv4_dhcp': True, 'ipv6_auto': True, 'description': '', 'mtu': None}]
2025-01-30 17:55:57.118 DEBUG (SyncWorker_5) [custom_components.truenas.apiparser] Processing source [{'id': 'enX1', 'name': 'enX1', 'fake': False, 'type': 'PHYSICAL', 'state': {'name': 'enX1', 'orig_name': 'enX1', 'description': 'enX1', 'mtu': 1500, 'cloned': False, 'flags': ['RUNNING', 'UP', 'BROADCAST', 'MULTICAST', 'LOWER_UP'], 'nd6_flags': ['HOMEADDRESS'], 'capabilities': ['tx-scatter-gather', 'tx-checksum-ipv6', 'tx-generic-segmentation', 'rx-gro', 'tx-tcp-segmentation', 'tx-tcp6-segmentation'], 'link_state': 'LINK_STATE_UP', 'media_type': '', 'media_subtype': '', 'active_media_type': '', 'active_media_subtype': '', 'supported_media': [], 'media_options': None, 'link_address': 'de:60:19:14:8b:58', 'permanent_link_address': 'de:60:19:14:8b:58', 'hardware_link_address': 'de:60:19:14:8b:58', 'aliases': [{'type': 'INET', 'address': '192.168.0.91', 'netmask': 24, 'broadcast': '192.168.0.255'}, {'type': 'INET6', 'address': 'fe80::dc60:19ff:fe14:8b58', 'netmask': 64, 'broadcast': 'fe80::ffff:ffff:ffff:ffff'}, {'type': 'LINK', 'address': 'de:60:19:14:8b:58'}], 'vrrp_config': None, 'rx_queues': 4, 'tx_queues': 4}, 'aliases': [], 'ipv4_dhcp': True, 'ipv6_auto': True, 'description': '', 'mtu': None}]
2025-01-30 17:55:57.118 DEBUG (SyncWorker_5) [custom_components.truenas.apiparser] Processing entry {'id': 'enX1', 'name': 'enX1', 'fake': False, 'type': 'PHYSICAL', 'state': {'name': 'enX1', 'orig_name': 'enX1', 'description': 'enX1', 'mtu': 1500, 'cloned': False, 'flags': ['RUNNING', 'UP', 'BROADCAST', 'MULTICAST', 'LOWER_UP'], 'nd6_flags': ['HOMEADDRESS'], 'capabilities': ['tx-scatter-gather', 'tx-checksum-ipv6', 'tx-generic-segmentation', 'rx-gro', 'tx-tcp-segmentation', 'tx-tcp6-segmentation'], 'link_state': 'LINK_STATE_UP', 'media_type': '', 'media_subtype': '', 'active_media_type': '', 'active_media_subtype': '', 'supported_media': [], 'media_options': None, 'link_address': 'de:60:19:14:8b:58', 'permanent_link_address': 'de:60:19:14:8b:58', 'hardware_link_address': 'de:60:19:14:8b:58', 'aliases': [{'type': 'INET', 'address': '192.168.0.91', 'netmask': 24, 'broadcast': '192.168.0.255'}, {'type': 'INET6', 'address': 'fe80::dc60:19ff:fe14:8b58', 'netmask': 64, 'broadcast': 'fe80::ffff:ffff:ffff:ffff'}, {'type': 'LINK', 'address': 'de:60:19:14:8b:58'}], 'vrrp_config': None, 'rx_queues': 4, 'tx_queues': 4}, 'aliases': [], 'ipv4_dhcp': True, 'ipv6_auto': True, 'description': '', 'mtu': None}
2025-01-30 17:55:57.118 DEBUG (SyncWorker_7) [custom_components.truenas.api] TrueNAS truenas.lan query: reporting/netdata_get_data, post, {'graphs': [{'name': 'load'}, {'name': 'cputemp'}, {'name': 'cpu'}, {'name': 'arcsize'}, {'name': 'memory'}, {'name': 'interface', 'identifier': 'enX1'}], 'reporting_query': {'start': '-90', 'end': '-30', 'aggregate': True}}
2025-01-30 17:55:57.160 DEBUG (SyncWorker_7) [custom_components.truenas.api] TrueNAS truenas.lan query response: [{'name': 'load', 'identifier': 'load', 'data': [[1738277640, 2.44, 1.53, 0.72], [1738277645, 2.53, 1.58, 0.74], [1738277650, 2.56, 1.6, 0.75], [1738277655, 2.52, 1.61, 0.76], [1738277660, 2.515207, 1.61, 0.7611983], [1738277665, 2.48, 1.61, 0.77], [1738277670, 2.44, 1.62, 0.77], [1738277675, 2.4, 1.63, 0.78], [1738277680, 2.37, 1.63, 0.79], [1738277685, 2.34, 1.64, 0.8], [1738277690, 2.29, 1.65, 0.81], [1738277695, 2.26, 1.66, 0.82], [1738277700, 2.24, 1.66, 0.82], [1738277705, 2.22, 1.67, 0.83], [1738277710, 2.29, 1.69, 0.84], [1738277715, 2.286403, 1.691199, 0.8411991], [1738277720, 2.26, 1.7, 0.85], [1738277725, 2.24, 1.7, 0.85]], 'legend': ['time', 'shortterm', 'midterm', 'longterm'], 'start': -90, 'end': -30, 'aggregations': {'min': {'shortterm': 2.22, 'midterm': 1.53, 'longterm': 0.72}, 'mean': {'shortterm': 2.3712005555555553, 'midterm': 1.6378443888888887, 'longterm': 0.7945776333333333}, 'max': {'shortterm': 2.56, 'midterm': 1.7, 'longterm': 0.85}}}, {'name': 'cputemp', 'identifier': 'cputemp', 'data': [[1738277637, 0, 0, 0, 0], [1738277638, 0, 0, 0, 0], [1738277639, 0, 0, 0, 0], [1738277640, 0, 0, 0, 0], [1738277641, 0, 0, 0, 0], [1738277642, 0, 0, 0, 0], [1738277643, 0, 0, 0, 0], [1738277644, 0, 0, 0, 0], [1738277645, 0, 0, 0, 0], [1738277646, 0, 0, 0, 0], [1738277647, 0, 0, 0, 0], [1738277648, 0, 0, 0, 0], [1738277649, 0, 0, 0, 0], [1738277650, 0, 0, 0, 0], [1738277651, 0, 0, 0, 0], [1738277652, 0, 0, 0, 0], [1738277653, 0, 0, 0, 0], [1738277654, 0, 0, 0, 0], [1738277655, 0, 0, 0, 0], [1738277656, 0, 0, 0, 0], [1738277657, 0, 0, 0, 0], [1738277658, 0, 0, 0, 0], [1738277659, 0, 0, 0, 0], [1738277660, 0, 0, 0, 0], [1738277661, 0, 0, 0, 0], [1738277662, 0, 0, 0, 0], [1738277663, 0, 0, 0, 0], [1738277664, 0, 0, 0, 0], [1738277665, 0, 0, 0, 0], [1738277666, 0, 0, 0, 0], [1738277667, 0, 0, 0, 0], [1738277668, 0, 0, 0, 0], [1738277669, 0, 0, 0, 0], [1738277670, 0, 0, 0, 0], [1738277671, 0, 0, 0, 0], [1738277672, 0, 0, 0, 0], [1738277673, 0, 0, 0, 0], [1738277674, 0, 0, 0, 0], [1738277675, 0, 0, 0, 0], [1738277676, 0, 0, 0, 0], [1738277677, 0, 0, 0, 0], [1738277678, 0, 0, 0, 0], [1738277679, 0, 0, 0, 0], [1738277680, 0, 0, 0, 0], [1738277681, 0, 0, 0, 0], [1738277682, 0, 0, 0, 0], [1738277683, 0, 0, 0, 0], [1738277684, 0, 0, 0, 0], [1738277685, 0, 0, 0, 0], [1738277686, 0, 0, 0, 0], [1738277687, 0, 0, 0, 0], [1738277688, 0, 0, 0, 0], [1738277689, 0, 0, 0, 0], [1738277690, 0, 0, 0, 0], [1738277691, 0, 0, 0, 0], [1738277692, 0, 0, 0, 0], [1738277693, 0, 0, 0, 0], [1738277694, 0, 0, 0, 0], [1738277695, 0, 0, 0, 0], [1738277696, 0, 0, 0, 0], [1738277697, 0, 0, 0, 0], [1738277698, 0, 0, 0, 0], [1738277699, 0, 0, 0, 0], [1738277700, 0, 0, 0, 0], [1738277701, 0, 0, 0, 0], [1738277702, 0, 0, 0, 0], [1738277703, 0, 0, 0, 0], [1738277704, 0, 0, 0, 0], [1738277705, 0, 0, 0, 0], [1738277706, 0, 0, 0, 0], [1738277707, 0, 0, 0, 0], [1738277708, 0, 0, 0, 0], [1738277709, 0, 0, 0, 0], [1738277710, 0, 0, 0, 0], [1738277711, 0, 0, 0, 0], [1738277712, 0, 0, 0, 0], [1738277713, 0, 0, 0, 0], [1738277714, 0, 0, 0, 0], [1738277715, 0, 0, 0, 0], [1738277716, 0, 0, 0, 0], [1738277717, 0, 0, 0, 0], [1738277718, 0, 0, 0, 0], [1738277719, 0, 0, 0, 0], [1738277720, 0, 0, 0, 0], [1738277721, 0, 0, 0, 0], [1738277722, 0, 0, 0, 0], [1738277723, 0, 0, 0, 0], [1738277724, 0, 0, 0, 0], [1738277725, 0, 0, 0, 0]], 'legend': ['time', '0', '1', '2', '3'], 'start': -90, 'end': -30, 'aggregations': {'min': {}, 'mean': {}, 'max': {}}}, {'name': 'cpu', 'identifier': 'cpu', 'data': [[1738277637, 0, 4.511278, 0.2506266, 0, 50.12531, 45.11278], [1738277638, 0, 0, 0.2506266, 0, 49.87469, 49.87469], [1738277639, 0, 0, 0, 0.2506266, 49.87469, 49.87469], [1738277640, 0, 19.75, 0.25, 0, 49.75, 30], [1738277641, 0, 11.027569, 0, 0.2506266, 49.37343, 39.34837], [1738277642, 0, 19.54887, 0.2506266, 0, 49.87469, 30.32581], [1738277643, 0.2487562, 25.12438, 0.2487562, 0.2487562, 49.25373, 24.62687], [1738277644, 0, 24.81203, 0, 0, 49.87469, 25.31328], [1738277645, 0, 25.06266, 0, 0.2506266, 49.62406, 24.81203], [1738277646, 0, 25.06266, 0, 0.2506266, 49.87469, 24.81203], [1738277647, 0, 25.06266, 0.2506266, 0, 49.62406, 25.06266], [1738277648, 0, 25.25, 0.25, 0, 49.5, 24.75], [1738277649, 0, 15.11335, 0, 0, 49.87406, 35.01259], [1738277650, 0, 0, 0, 0.2506266, 49.87469, 49.87469], [1738277651, 0, 19.65174, 0.2487562, 0.2487562, 49.50249, 30.0995], [1738277652, 0, 26.51515, 0.2525253, 0.2525253, 48.73737, 24.24242], [1738277653, 0, 24.25, 0.25, 0, 49.75, 25.75], [1738277654, 0, 9.25, 0, 0.25, 50, 40.25], [1738277655, 0, 0, 0.5025126, 0, 49.74874, 49.74874], [1738277656, 0, 4.010025, 2.255639, 0.2506266, 45.61404, 47.86967], [1738277657, 0, 4.5, 0.25, 0.25, 49.75, 45.25], [1738277658, 0, 4.761905, 0.2506266, 0, 49.62406, 45.36341], [1738277659, 0, 0, 0.5012531, 0, 49.87469, 49.37343], [1738277660, 0, 0.2512563, 0.2512563, 0, 49.74874, 49.74874], [1738277661, 0, 0, 0, 0, 50, 50], [1738277662, 0, 9, 0.25, 0, 36, 54.75], [1738277663, 0, 0, 0, 0.2518892, 24.93703, 74.81108], [1738277664, 0, 0, 0.2506266, 0, 25.56391, 74.18546], [1738277665, 0, 0.2506266, 0.2506266, 0, 25.06266, 74.18546], [1738277666, 0.2506266, 4.260652, 3.759398, 0.2506266, 24.06015, 67.41855], [1738277667, 0, 0, 0.2506266, 0, 25.06266, 74.68672], [1738277668, 0, 4.522613, 0, 0.2512563, 24.87437, 70.35176], [1738277669, 0, 0, 0.75, 0, 25.25, 74], [1738277670, 0, 1, 1, 0.25, 24.25, 73.25], [1738277671, 0, 3.544304, 5.822785, 0, 24.3038, 66.32911], [1738277672, 0, 0, 0.25, 0, 25, 74.75], [1738277673, 0, 0.5, 0.25, 0, 25, 74.25], [1738277674, 0, 0, 0, 0.5025126, 24.87437, 74.62312], [1738277675, 0, 0, 0.25, 0, 25, 74.5], [1738277676, 0, 0, 0.2512563, 0, 24.87437, 74.87437], [1738277677, 0, 0, 0.2506266, 0, 25.06266, 74.68672], [1738277678, 0, 1.0050251, 0.2512563, 0, 24.62312, 74.1206], [1738277679, 0, 3.768844, 0.5025126, 0, 25.12563, 70.60302], [1738277680, 0, 0, 0.25, 0, 25, 74.75], [1738277681, 0, 0.7556675, 0.7556675, 0.2518892, 24.68514, 73.29975], [1738277682, 0, 0, 0.25, 0.25, 24.75, 74.75], [1738277683, 0, 0, 0, 0, 25.12563, 74.87437], [1738277684, 0, 0, 0.2506266, 0, 25.06266, 74.68672], [1738277685, 0, 0, 0.2506266, 0, 25.06266, 74.68672], [1738277686, 0, 0.25, 0.25, 0, 24.75, 74.5], [1738277687, 0, 0, 0.2506266, 0, 25.06266, 74.68672], [1738277688, 0, 0, 0, 0.2518892, 24.68514, 75.06297], [1738277689, 0, 4.5, 0.25, 0, 25, 70.25], [1738277690, 0, 0, 0, 0, 25.06266, 74.93734], [1738277691, 0, 0, 0.2506266, 0, 24.81203, 74.68672], [1738277692, 0, 0, 0.2512563, 0, 24.87437, 74.87437], [1738277693, 0, 0.5, 0.25, 0, 25, 74.25], [1738277694, 0, 0, 0, 0.25, 25, 74.75], [1738277695, 0, 0, 0, 0, 24.93703, 75.06297], [1738277696, 0, 0.7575758, 0.7575758, 0.2525253, 24.74747, 73.48485], [1738277697, 0, 0, 0.25, 0, 25, 74.5], [1738277698, 0, 0, 0, 0, 25.12563, 74.87437], [1738277699, 0, 4.5, 0.25, 0.25, 24.75, 70.25], [1738277700, 0, 0, 0, 0, 25.12563, 74.87437], [1738277701, 0, 0, 0.2506266, 0, 25.06266, 74.68672], [1738277702, 0, 0, 0.2506266, 0, 24.81203, 74.68672], [1738277703, 0, 0, 0.2506266, 0, 25.06266, 74.68672], [1738277704, 0, 0, 0, 0, 24.93703, 75.06297], [1738277705, 0, 0, 0.25, 0, 25, 74.75], [1738277706, 0, 0.2506266, 0.2506266, 0, 24.81203, 74.68672], [1738277707, 0, 0, 0.2506266, 0, 25.06266, 74.68672], [1738277708, 0, 0.75, 0.25, 0.5, 24.75, 73.5], [1738277709, 0, 4.773869, 0, 0, 24.87437, 70.35176], [1738277710, 0, 0, 0.5, 0, 25, 74.5], [1738277711, 0, 1.758794, 0.2512563, 0.2512563, 24.62312, 73.11558], [1738277712, 0, 0, 0.2506266, 0, 24.81203, 74.93734], [1738277713, 0, 13.283208, 0, 0, 25.06266, 61.65414], [1738277714, 0, 0, 0, 0, 25.12563, 74.87437], [1738277715, 0, 0, 0.2493766, 0.2493766, 24.93766, 74.31421], [1738277716, 0, 0, 0.2512563, 0, 24.87437, 74.87437], [1738277717, 0, 13.032581, 0, 0.2506266, 25.06266, 61.65414], [1738277718, 0, 0, 0.2506266, 0, 25.06266, 74.68672], [1738277719, 0, 4.522613, 0.2512563, 0, 24.87437, 70.35176], [1738277720, 0, 0, 0.5025126, 0, 24.87437, 74.62312], [1738277721, 0, 4.738155, 0.2493766, 0, 24.68828, 70.07481], [1738277722, 0, 4.75, 0.25, 0, 25, 70], [1738277723, 0, 4.25, 0.25, 0.25, 25, 70.25], [1738277724, 0, 1.772152, 0.5063291, 0.5063291, 24.05063, 73.16456], [1738277725, 0, 0.7594937, 0.5063291, 0.2531646, 24.3038, 73.92405], [1738277726, 0, 0, 0.2506266, 0, 25.31328, 74.43609]], 'legend': ['time', 'softirq', 'user', 'system', 'nice', 'iowait', 'idle'], 'start': -90, 'end': -30, 'aggregations': {'min': {'softirq': 0, 'user': 0, 'system': 0, 'nice': 0, 'iowait': 24.05063, 'idle': 24.24242}, 'mean': {'softirq': 0.005548697777777778, 'user': 4.52524815111111, 'system': 0.3515917555555557, 'nice': 0.08919043222222223, 'iowait': 31.870059111111125, 'idle': 63.10553555555555}, 'max': {'softirq': 0.2506266, 'user': 26.51515, 'system': 5.822785, 'nice': 0.5063291, 'iowait': 50.12531, 'idle': 75.06297}}}, {'name': 'arcsize', 'identifier': 'arcsize', 'data': [[1738277637, 266.8619], [1738277638, 266.8619], [1738277639, 266.8619], [1738277640, 266.8619], [1738277641, 266.8619], [1738277642, 266.8619], [1738277643, 266.8619], [1738277644, 266.8619], [1738277645, 266.8619], [1738277646, 266.8619], [1738277647, 266.8619], [1738277648, 266.8619], [1738277649, 266.8599], [1738277650, 266.8599], [1738277651, 266.8599], [1738277652, 266.8599], [1738277653, 266.8599], [1738277654, 266.846], [1738277655, 266.846], [1738277656, 266.846], [1738277657, 266.846], [1738277658, 266.846], [1738277659, 266.8498], [1738277660, 266.8498], [1738277661, 266.8498], [1738277662, 266.8464], [1738277663, 266.8464], [1738277664, 266.5938], [1738277665, 266.5938], [1738277666, 266.5938], [1738277667, 266.5938], [1738277668, 266.5938], [1738277669, 266.5947], [1738277670, 266.5947], [1738277671, 266.7201], [1738277672, 266.7201], [1738277673, 266.7201], [1738277674, 266.8483], [1738277675, 266.8483], [1738277676, 266.8483], [1738277677, 266.8483], [1738277678, 266.8483], [1738277679, 266.7258], [1738277680, 266.7258], [1738277681, 266.7258], [1738277682, 266.7258], [1738277683, 266.7258], [1738277684, 266.7258], [1738277685, 266.7258], [1738277686, 266.7258], [1738277687, 266.7258], [1738277688, 266.7258], [1738277689, 266.7258], [1738277690, 266.7258], [1738277691, 266.7258], [1738277692, 266.7258], [1738277693, 266.7258], [1738277694, 266.7258], [1738277695, 266.7258], [1738277696, 266.7258], [1738277697, 266.7258], [1738277698, 266.7258], [1738277699, 266.7258], [1738277700, 266.7258], [1738277701, 266.7258], [1738277702, 266.7258], [1738277703, 266.7258], [1738277704, 266.7258], [1738277705, 266.7258], [1738277706, 266.7258], [1738277707, 266.7258], [1738277708, 266.7258], [1738277709, 266.7258], [1738277710, 266.7258], [1738277711, 266.7258], [1738277712, 266.7258], [1738277713, 266.7258], [1738277714, 266.7258], [1738277715, 266.7073], [1738277716, 266.7073], [1738277717, 266.7073], [1738277718, 266.7073], [1738277719, 266.7073], [1738277720, 266.7082], [1738277721, 266.7082], [1738277722, 266.7082], [1738277723, 266.7082], [1738277724, 266.7082], [1738277725, 266.7082], [1738277726, 266.7082]], 'legend': ['time', 'arc_size'], 'start': -90, 'end': -30, 'aggregations': {'min': {'arc_size': 266.5938}, 'mean': {'arc_size': 266.75885999999997}, 'max': {'arc_size': 266.8619}}}, {'name': 'memory', 'identifier': 'memory', 'data': [[1738277637, 13792.441, 2031.496, 174.5898, 0.0273438], [1738277638, 13792.441, 2031.496, 174.5898, 0.0273438], [1738277639, 13792.441, 2031.496, 174.5898, 0.0273438], [1738277640, 13792.441, 2031.496, 174.5898, 0.0273438], [1738277641, 13792.441, 2031.496, 174.5898, 0.0273438], [1738277642, 13792.441, 2031.496, 174.5898, 0.0273438], [1738277643, 13792.441, 2031.496, 174.5898, 0.0273438], [1738277644, 13792.441, 2031.496, 174.5898, 0.0273438], [1738277645, 13792.207, 2031.73, 174.5898, 0.0273438], [1738277646, 13792.207, 2031.715, 174.6055, 0.0273438], [1738277647, 13795.672, 2028.25, 174.6055, 0.0273438], [1738277648, 13795.836, 2028.086, 174.6055, 0.0273438], [1738277649, 13807.988, 2015.934, 174.6055, 0.0273438], [1738277650, 13807.809, 2016.113, 174.6055, 0.0273438], [1738277651, 13807.809, 2016.113, 174.6055, 0.0273438], [1738277652, 13807.32, 2016.602, 174.6055, 0.0273438], [1738277653, 13807.32, 2016.598, 174.6094, 0.0273438], [1738277654, 13807.086, 2016.832, 174.6094, 0.0273438], [1738277655, 13807.086, 2016.828, 174.6133, 0.0273438], [1738277656, 13807.086, 2016.828, 174.6133, 0.0273438], [1738277657, 13803.086, 2020.828, 174.6133, 0.0273438], [1738277658, 13803.086, 2020.828, 174.6133, 0.0273438], [1738277659, 13802.621, 2021.293, 174.6133, 0.0273438], [1738277660, 13802.168, 2021.746, 174.6133, 0.0273438], [1738277661, 13802.168, 2021.746, 174.6133, 0.0273438], [1738277662, 13802.168, 2021.746, 174.6133, 0.0273438], [1738277663, 13802.168, 2021.746, 174.6133, 0.0273438], [1738277664, 13802.168, 2021.746, 174.6133, 0.0273438], [1738277665, 13802.168, 2021.742, 174.6172, 0.0273438], [1738277666, 13802.168, 2021.742, 174.6172, 0.0273438], [1738277667, 13790.742, 2033.168, 174.6172, 0.0273438], [1738277668, 13790.906, 2033.004, 174.6172, 0.0273438], [1738277669, 13805.816, 2018.094, 174.6172, 0.0273438], [1738277670, 13803.73, 2019.895, 174.6172, 0.3125], [1738277671, 13785.449, 2038.176, 174.6172, 0.3125], [1738277672, 13785.449, 2038.176, 174.6172, 0.3125], [1738277673, 13785.449, 2038.176, 174.6172, 0.3125], [1738277674, 13783.113, 2040.703, 174.7109, 0.0273438], [1738277675, 13782.895, 2041.016, 174.6172, 0.0273438], [1738277676, 13782.441, 2041.469, 174.6172, 0.0273438], [1738277677, 13782.441, 2041.469, 174.6172, 0.0273438], [1738277678, 13779.73, 2044.18, 174.6172, 0.0273438], [1738277679, 13794.117, 2029.793, 174.6172, 0.0273438], [1738277680, 13794.305, 2029.605, 174.6172, 0.0273438], [1738277681, 13794.305, 2029.605, 174.6172, 0.0273438], [1738277682, 13794.305, 2029.605, 174.6172, 0.0273438], [1738277683, 13794.305, 2029.605, 174.6172, 0.0273438], [1738277684, 13794.305, 2029.605, 174.6172, 0.0273438], [1738277685, 13794.305, 2029.605, 174.6172, 0.0273438], [1738277686, 13794.059, 2029.852, 174.6172, 0.0273438], [1738277687, 13794.059, 2029.852, 174.6172, 0.0273438], [1738277688, 13790.059, 2033.852, 174.6172, 0.0273438], [1738277689, 13790.059, 2033.852, 174.6172, 0.0273438], [1738277690, 13790.059, 2033.852, 174.6172, 0.0273438], [1738277691, 13789.605, 2034.305, 174.6172, 0.0273438], [1738277692, 13789.605, 2034.305, 174.6172, 0.0273438], [1738277693, 13789.605, 2034.305, 174.6172, 0.0273438], [1738277694, 13789.605, 2034.305, 174.6172, 0.0273438], [1738277695, 13789.605, 2034.305, 174.6172, 0.0273438], [1738277696, 13789.605, 2034.305, 174.6172, 0.0273438], [1738277697, 13789.605, 2034.305, 174.6172, 0.0273438], [1738277698, 13781.605, 2042.305, 174.6172, 0.0273438], [1738277699, 13781.605, 2042.305, 174.6172, 0.0273438], [1738277700, 13781.605, 2042.305, 174.6172, 0.0273438], [1738277701, 13781.605, 2042.305, 174.6172, 0.0273438], [1738277702, 13781.605, 2042.305, 174.6172, 0.0273438], [1738277703, 13781.605, 2042.305, 174.6172, 0.0273438], [1738277704, 13781.605, 2042.305, 174.6172, 0.0273438], [1738277705, 13781.605, 2042.305, 174.6172, 0.0273438], [1738277706, 13781.605, 2042.305, 174.6172, 0.0273438], [1738277707, 13781.605, 2042.305, 174.6172, 0.0273438], [1738277708, 13779.633, 2044.277, 174.6172, 0.0273438], [1738277709, 13779.633, 2044.277, 174.6172, 0.0273438], [1738277710, 13779.633, 2044.277, 174.6172, 0.0273438], [1738277711, 13779.633, 2044.273, 174.6211, 0.0273438], [1738277712, 13779.633, 2044.273, 174.6211, 0.0273438], [1738277713, 13779.633, 2044.273, 174.6211, 0.0273438], [1738277714, 13779.633, 2044.273, 174.6211, 0.0273438], [1738277715, 13779.633, 2044.273, 174.6211, 0.0273438], [1738277716, 13779.633, 2044.273, 174.6211, 0.0273438], [1738277717, 13779.633, 2044.273, 174.6211, 0.0273438], [1738277718, 13779.633, 2044.273, 174.6211, 0.0273438], [1738277719, 13785.754, 2038.152, 174.6211, 0.0273438], [1738277720, 13785.754, 2038.152, 174.6211, 0.0273438], [1738277721, 13785.754, 2038.152, 174.6211, 0.0273438], [1738277722, 13785.754, 2038.152, 174.6211, 0.0273438], [1738277723, 13785.754, 2038.152, 174.6211, 0.0273438], [1738277724, 13785.754, 2038.152, 174.6211, 0.0273438], [1738277725, 13785.754, 2038.152, 174.6211, 0.0273438], [1738277726, 13785.754, 2038.152, 174.6211, 0.0273438]], 'legend': ['time', 'free', 'used', 'cached', 'buffers'], 'start': -90, 'end': -30, 'aggregations': {'min': {'free': 13779.633, 'used': 2015.934, 'cached': 174.5898, 'buffers': 0.0273438}, 'mean': {'free': 13790.895622222217, 'used': 2033.0042777777753, 'cached': 174.61467777777796, 'buffers': 0.04001740888888898}, 'max': {'free': 13807.988, 'used': 2044.277, 'cached': 174.7109, 'buffers': 0.3125}}}, {'name': 'interface', 'identifier': 'enX1', 'data': [[1738277637, 5.067326, 5.138236], [1738277638, 2.364674, 2.397764], [1738277639, 2.51946, 0], [1738277640, 24.23123, 1.767144], [1738277641, 18.29283, 77.74884], [1738277642, 30.06821, 37.97776], [1738277643, 49.12378, 69.59247], [1738277644, 33.31351, 125.30568], [1738277645, 35.7645, 90.04093], [1738277646, 37.63074, 69.36077], [1738277647, 34.87578, 106.79493], [1738277648, 33.97772, 116.17991], [1738277649, 15.524521, 120.21053], [1738277650, 4.564214, 39.38904], [1738277651, 25.23647, 3.239959], [1738277652, 38.70621, 86.07638], [1738277653, 37.7364, 139.07943], [1738277654, 16.592721, 80.43414], [1738277655, 5.761078, 15.842092], [1738277656, 2.623144, 1.0963394], [1738277657, 6.489734, 14.600503], [1738277658, 6.565229, 12.535872], [1738277659, 7.89565, 2.783286], [1738277660, 5.200953, 0], [1738277661, 2.202289, 0], [1738277662, 14.19813, 14.382066], [1738277663, 8.272835, 7.455779], [1738277664, 0.8806578, 0.3461545], [1738277665, 3.698082, 0], [1738277666, 4.976734, 5.198033], [1738277667, 3.578967, 2.425967], [1738277668, 3.967672, 5.138184], [1738277669, 3.922635, 2.397816], [1738277670, 5.768728, 6.534677], [1738277671, 13.777989, 3.894797], [1738277672, 20.53826, 0.3945263], [1738277673, 8.915697, 1.0087183], [1738277674, 0.8712343, 0.4712817], [1738277675, 16.303534, 24.1253], [1738277676, 8.066645, 11.793239], [1738277677, 4.533687, 0.7839863], [1738277678, 5.992565, 2.469509], [1738277679, 4.626592, 5.879798], [1738277680, 3.627592, 2.260164], [1738277681, 7.749483, 5.045529], [1738277682, 9.195352, 2.954489], [1738277683, 3.953309, 0.2799826], [1738277684, 0.7701473, 0], [1738277685, 16.213827, 0], [1738277686, 8.285808, 0.7418138], [1738277687, 2.423287, 0.3461862], [1738277688, 1.720378, 0.9054842], [1738277689, 5.879468, 5.560902], [1738277690, 4.912966, 2.397613], [1738277691, 2.202119, 0], [1738277692, 5.886659, 0], [1738277693, 4.631907, 1.701861], [1738277694, 0.9926739, 0.7941392], [1738277695, 3.447394, 0], [1738277696, 4.826892, 4.521964], [1738277697, 3.563578, 2.110036], [1738277698, 1.4639664, 0.7200171], [1738277699, 6.010713, 5.834336], [1738277700, 5.030061, 2.565647], [1738277701, 2.202142, 0], [1738277702, 5.885066, 0], [1738277703, 3.618746, 0], [1738277704, 0.9339858, 0.4909078], [1738277705, 3.640795, 0.2290922], [1738277706, 4.194097, 0.976357], [1738277707, 3.519233, 0.8156341], [1738277708, 4.667665, 5.474164], [1738277709, 7.451587, 7.844707], [1738277710, 5.03062, 2.505138], [1738277711, 13.847578, 51.92156], [1738277712, 11.321249, 24.23044], [1738277713, 15.006702, 20.79315], [1738277714, 5.83393, 9.702854], [1738277715, 3.447313, 0], [1738277716, 1.6086873, 0], [1738277717, 13.450743, 20.75974], [1738277718, 6.778999, 10.277258], [1738277719, 6.261194, 6.001951], [1738277720, 8.654944, 2.967595], [1738277721, 7.847976, 14.450287], [1738277722, 11.515411, 20.94251], [1738277723, 5.873082, 20.63496], [1738277724, 6.366088, 15.607041], [1738277725, 9.023287, 9.502359], [1738277726, 3.239185, 2.456291]], 'legend': ['time', 'received', 'sent'], 'start': -90, 'end': -30, 'aggregations': {'min': {'received': 0.7701473, 'sent': 0}, 'mean': {'received': 9.880298920000003, 'sent': 17.77351108555555}, 'max': {'received': 49.12378, 'sent': 139.07943}}}]
2025-01-30 17:55:57.161 ERROR (MainThread) [custom_components.truenas.coordinator] Unexpected error fetching TrueNAS data
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 379, in _async_refresh
    self.data = await self._async_update_data()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/truenas/coordinator.py", line 97, in _async_update_data
    await self.hass.async_add_executor_job(self.get_systemstats)
  File "/usr/local/lib/python3.13/concurrent/futures/thread.py", line 59, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/truenas/coordinator.py", line 445, in get_systemstats
    max(tmp_graph[i]["aggregations"]["mean"].values()), 2
    ~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: max() iterable argument is empty
2025-01-30 17:55:57.161 DEBUG (MainThread) [custom_components.truenas.coordinator] Finished fetching TrueNAS data in 0.098 seconds (success: False)

I believe this is related to #191