Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to add "Area" on Integration setup #34

Open
geeneo opened this issue May 23, 2023 · 8 comments
Open

Unable to add "Area" on Integration setup #34

geeneo opened this issue May 23, 2023 · 8 comments

Comments

@geeneo
Copy link

geeneo commented May 23, 2023

Home Assistant : VM
Home Assistant 2023.5.3
Supervisor 2023.04.1
Operating System 10.1
Frontend 20230503.3 - latest

Integration stopped working. removed and try to reinstall.

Unable to load areas.

image

Log

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 455, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 731, in _async_add_entity
await entity.add_to_platform_finish()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 845, in add_to_platform_finish
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 585, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 652, in _async_write_ha_state
attr.update(self.extra_state_attributes or {})
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

@JaredZA11
Copy link

Getting the same issue

@swartjean
Copy link
Owner

Thanks for the feedback @geeneo @JaredZA11, will take a look ASAP.

@swartjean
Copy link
Owner

Unfortunately I wasn't able to replicate in either HA 2023.5.3 or 2023.5.4. Could you share exactly which area you were attempting to search for when the error popped up?

The fact that the error was raised here "/config/custom_components/eskom_loadshedding/sensor.py", line 120 makes me doubt that this is a configuration issue - HA was trying to get state attributes from the sensor which should only happen if the sensor already exists.

@JaredZA11 do you have version information and an error log you can share?

@JaredZA11
Copy link

Issue turned out to be on my side.
ESP API thinks I'm trying to abuse and blocked me.

@JossPer0
Copy link

Hey, how did you manage t find out that they were blocking you? I am having the same issue

@JaredZA11
Copy link

JaredZA11 commented May 31, 2023 via email

@JossPer0
Copy link

JossPer0 commented Jun 1, 2023

Awesome thanks

@LeonvanHeerden
Copy link

LeonvanHeerden commented Nov 17, 2023

I think I have the same issue.
My connection was working.
I am trying to setup Node-Red as well now and thought I should just register a separate API key for that until I am happy that it works. I have disabled the Node-red instance yesterday, since it was not working and then noticed my main connection is now not working. Trying to re-create the instance and failing, I found this post.

So do I also just have to leave it for days or is there a way to request an unblock.
EDIT:
curl --location "https://developer.sepush.co.za/business/2.0/status" --header "token: API_KEY"
Result shows exactly what is described above and that it may be unblocked after 24 hours. Will have to wait and see.

Then I assume I should be using the same API key for both Node-red and the HA to prevent his in future?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants