Error adding entity sensor.hydro_imgw_152230070 for domain sensor with platform hydro_imgw
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 736, in _async_add_entity
entity_name = entity.name
^^^^^^^^^^^
File "/config/custom_components/hydro_imgw/sensor.py", line 43, in name
name = self._station_id if self._data is None else self.extra_state_attributes["name"]
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/hydro_imgw/sensor.py", line 70, in extra_state_attributes
attr_value = HydroImgwSensor.extractor(self._data, json_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/hydro_imgw/sensor.py", line 94, in extractor
return extractor_arr(json, path.split("."))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/hydro_imgw/sensor.py", line 91, in extractor_arr
return extractor_arr(json_obj[path_array[0]], path_array[1:])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/hydro_imgw/sensor.py", line 91, in extractor_arr
return extractor_arr(json_obj[path_array[0]], path_array[1:])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/hydro_imgw/sensor.py", line 88, in extractor_arr
if path_array[0] not in json_obj:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: argument of type 'NoneType' is not iterable
Other stations are working correctly; the problem occurs only with this one.
hydro_imgw sensor in configuration.yaml looks like:
Output from plugin debug:
Other stations are working correctly; the problem occurs only with this one.