skalavala/mysmarthome

palo alto custom sensor

darkstar939 opened this issue · 1 comments

I am trying to add the palo alto custom sensor and am getting an error. Any ideas how to fix this....

paloalto: Error on device update!
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 261, in _async_add_entity
await entity.async_device_update(warning=False)
File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 377, in async_device_update
await self.hass.async_add_executor_job(self.update)
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/paloalto/sensor.py", line 129, in update
self._api.update()
File "/config/custom_components/paloalto/sensor.py", line 200, in update
self.parse_data()
File "/config/custom_components/paloalto/sensor.py", line 260, in parse_data
self.parse_temperature()
File "/config/custom_components/paloalto/sensor.py", line 222, in parse_temperature
self._sensors["core_temp"] = round(float(nodes[0].text), 2)
IndexError: list index out of range

disregard, I have a PA-VM 100 and do not need temperature, I commented out all the relevant lines.

Brilliant work by the way. I am going to further customize it and expand your work. I appreciate you posting this and sharing your hard work.

Cheers!