I removed and reinstalled the truenas integration and am missing many of the entities that used to be there. It seems the sensors aren't populating. There are a total of 43 entities successfully being created in home assistant.
How to reproduce the issue
Install integration.
Expected behavior
Successful integration initiation with all entities.
Software versions
Home Assistant version: 2023.10.3
TrueNAS integration version: 1.2.5
TrueNAS version: SCALE-22.12.4.2
Traceback/Error logs
Logger: homeassistant.components.sensor
Source: helpers/entity_platform.py:359
Integration: Sensor (documentation, issues)
First occurred: 10:23:08 AM (1 occurrences)
Last logged: 10:23:08 AM
Error while setting up truenas platform for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 359, in _async_setup_platform
await asyncio.shield(task)
File "/config/custom_components/truenas/sensor.py", line 31, in async_setup_entry
await model_async_setup_entry(
File "/config/custom_components/truenas/model.py", line 58, in model_async_setup_entry
update_controller()
File "/config/custom_components/truenas/model.py", line 44, in update_controller
model_update_items(
File "/config/custom_components/truenas/model.py", line 111, in model_update_items
if tmp := _register_entity(sensors, item_id, uid, uid_sensor):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/truenas/model.py", line 78, in _register_entity
_sensors[_item_id].async_schedule_update_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 956, in async_schedule_update_ha_state
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 756, in async_write_ha_state
raise RuntimeError(f"Attribute hass is None for {self}")
RuntimeError: Attribute hass is None for <Entity Storage/Family>
Logger: homeassistant.util.logging
Source: util/logging.py:116
First occurred: 10:23:26 AM (1 occurrences)
Last logged: 10:23:26 AM
Exception in update_controller when dispatching 'truenas-update-TrueNAS': () Traceback (most recent call last): File "/config/custom_components/truenas/model.py", line 44, in update_controller model_update_items( File "/config/custom_components/truenas/model.py", line 104, in model_update_items if tmp := _register_entity(sensors, item_id, "", uid_sensor): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/truenas/model.py", line 78, in _register_entity _sensors[_item_id].async_schedule_update_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 956, in async_schedule_update_ha_state self.async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 756, in async_write_ha_state raise RuntimeError(f"Attribute hass is None for {self}") RuntimeError: Attribute hass is None for
Describe the issue
I removed and reinstalled the truenas integration and am missing many of the entities that used to be there. It seems the sensors aren't populating. There are a total of 43 entities successfully being created in home assistant.
How to reproduce the issue
Install integration.
Expected behavior
Successful integration initiation with all entities.
Software versions
Traceback/Error logs
Logger: homeassistant.components.sensor Source: helpers/entity_platform.py:359 Integration: Sensor (documentation, issues) First occurred: 10:23:08 AM (1 occurrences) Last logged: 10:23:08 AM
Error while setting up truenas platform for sensor Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 359, in _async_setup_platform await asyncio.shield(task) File "/config/custom_components/truenas/sensor.py", line 31, in async_setup_entry await model_async_setup_entry( File "/config/custom_components/truenas/model.py", line 58, in model_async_setup_entry update_controller() File "/config/custom_components/truenas/model.py", line 44, in update_controller model_update_items( File "/config/custom_components/truenas/model.py", line 111, in model_update_items if tmp := _register_entity(sensors, item_id, uid, uid_sensor): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/truenas/model.py", line 78, in _register_entity _sensors[_item_id].async_schedule_update_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 956, in async_schedule_update_ha_state self.async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 756, in async_write_ha_state raise RuntimeError(f"Attribute hass is None for {self}") RuntimeError: Attribute hass is None for <Entity Storage/Family>
Logger: homeassistant.util.logging Source: util/logging.py:116 First occurred: 10:23:26 AM (1 occurrences) Last logged: 10:23:26 AM
Exception in update_controller when dispatching 'truenas-update-TrueNAS': () Traceback (most recent call last): File "/config/custom_components/truenas/model.py", line 44, in update_controller model_update_items( File "/config/custom_components/truenas/model.py", line 104, in model_update_items if tmp := _register_entity(sensors, item_id, "", uid_sensor): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/truenas/model.py", line 78, in _register_entity _sensors[_item_id].async_schedule_update_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 956, in async_schedule_update_ha_state self.async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 756, in async_write_ha_state raise RuntimeError(f"Attribute hass is None for {self}") RuntimeError: Attribute hass is None for