Hi,
I'm trying to install this into HA for a friend of mine - I have new API Key from ESP but as soon as I try enter the Suburb, I get the following error message: Unable to reach Provider. See Logs for details.
Here's the error log:
This error originated from a custom integration.
Logger: homeassistant
Source: custom_components/eskom_loadshedding/sensor.py:120
integration: Eskom Loadshedding Interface (documentation, issues)
First occurred: 14:23:45 (1 occurrences)
Last logged: 14:23:45
Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 255, in _handle_refresh_interval
await self._async_refresh(log_failures=True, scheduled=True)
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 411, in _async_refresh
self.async_update_listeners()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 165, in async_update_listeners
update_callback()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 491, in _handle_coordinator_update
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1007, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1133, in _async_write_ha_state
state, attr, capabilities, shadowed_attr = self.async_calculate_state()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1072, in async_calculate_state
if extra_state_attributes := self.extra_state_attributes:
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/eskom_loadshedding/sensor.py", line 120, in extra_state_attributes
time_updated = datetime.strptime(stage_updated, time_format)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: strptime() argument 1 must be str, not None
Hi, I'm trying to install this into HA for a friend of mine - I have new API Key from ESP but as soon as I try enter the Suburb, I get the following error message: Unable to reach Provider. See Logs for details.
Here's the error log: This error originated from a custom integration.
Logger: homeassistant Source: custom_components/eskom_loadshedding/sensor.py:120 integration: Eskom Loadshedding Interface (documentation, issues) First occurred: 14:23:45 (1 occurrences) Last logged: 14:23:45
Error doing job: Task exception was never retrieved (None) Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 255, in _handle_refresh_interval await self._async_refresh(log_failures=True, scheduled=True) File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 411, in _async_refresh self.async_update_listeners() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 165, in async_update_listeners update_callback() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 491, in _handle_coordinator_update self.async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1007, in async_write_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1133, in _async_write_ha_state state, attr, capabilities, shadowed_attr = self.async_calculate_state() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1072, in async_calculate_state if extra_state_attributes := self.extra_state_attributes: ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/eskom_loadshedding/sensor.py", line 120, in extra_state_attributes time_updated = datetime.strptime(stage_updated, time_format) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: strptime() argument 1 must be str, not None
Please can you assist