2020-12-06 10:11:21 ERROR (MainThread) [homeassistant.components.sensor] Error adding entities for domain sensor with platform spacex Traceback (most recent call last): File "/home/homeassistant/.local/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 316, in async_add_entities await asyncio.gather(*tasks) File "/home/homeassistant/.local/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 507, in _async_add_entity await entity.add_to_platform_finish() File "/home/homeassistant/.local/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 531, in add_to_platform_finish self.async_write_ha_state() File "/home/homeassistant/.local/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 296, in async_write_ha_state self._async_write_ha_state() File "/home/homeassistant/.local/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 323, in _async_write_ha_state attr.update(self.device_state_attributes or {}) File "/home/homeassistant/.homeassistant/custom_components/spacex/sensor.py", line 423, in device_state_attributes self.attrs["fairings_reused"] = latest_launch_data["fairings"].get( AttributeError: 'NoneType' object has no attribute 'get'
This is from latest launch (Dec 6, 2020) was a cargo launch for the Space Station and possibly no "fairings" in latest_launch_data.
2020-12-06 10:11:21 ERROR (MainThread) [homeassistant.components.sensor] Error adding entities for domain sensor with platform spacex Traceback (most recent call last): File "/home/homeassistant/.local/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 316, in async_add_entities await asyncio.gather(*tasks) File "/home/homeassistant/.local/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 507, in _async_add_entity await entity.add_to_platform_finish() File "/home/homeassistant/.local/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 531, in add_to_platform_finish self.async_write_ha_state() File "/home/homeassistant/.local/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 296, in async_write_ha_state self._async_write_ha_state() File "/home/homeassistant/.local/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 323, in _async_write_ha_state attr.update(self.device_state_attributes or {}) File "/home/homeassistant/.homeassistant/custom_components/spacex/sensor.py", line 423, in device_state_attributes self.attrs["fairings_reused"] = latest_launch_data["fairings"].get( AttributeError: 'NoneType' object has no attribute 'get'
This is from latest launch (Dec 6, 2020) was a cargo launch for the Space Station and possibly no "fairings" in latest_launch_data.