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
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)
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)
I believe this is related to #191