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

Changing the EskomsePush API key #27

Closed
wimdebruyn opened this issue Oct 28, 2022 · 10 comments
Closed

Changing the EskomsePush API key #27

wimdebruyn opened this issue Oct 28, 2022 · 10 comments

Comments

@wimdebruyn
Copy link

@swartjean , thank you for a great integration. I am using it to disconnect and reconnect my Inverter system from the grid before and after loadshedding.

Eskomsepush has changed their API token issuing system, requiring all API tokens to be changed before end of November. Is it possible to add a feature to the configure flow to change the API token?

@Dyltong
Copy link

Dyltong commented Oct 28, 2022

Agreed, thanks @swartjean great integration.

I am having the same issue as @wimdebruyn

Either a way to update the key in the interface or instructions on how to do it another way would be appreciated.

@swartjean
Copy link
Owner

Hi @wimdebruyn @Dyltong, thanks for the good feedback and glad that you guys are getting some use out of the integration 👍

Yes, this is something that I have been meaning to add to the integration configuration options - I will hopefully get to it during the week and release a new version. Will post an update here as soon as it's ready.

For now the only way to update your API key is to remove and re-install the integration by going through the initial configuration steps again. I believe that your entity names, etc. should all still stay the same after reinstallation so it shouldn't affect your automations. Let me know if there are any unexpected issues.

@Dyltong
Copy link

Dyltong commented Oct 29, 2022

thanks @swartjean

Yes, I confirm that I removed and reinstalled the API yesterday and all the entity names, ID's etc remained the same.

@louispires
Copy link

My Legacy API also expired now, got a new one and couldn't change it.

Would be a nice feature indeed

@jlwainwright
Copy link

jlwainwright commented Nov 17, 2022

For the life of me not able to find my new API. I knew it came in, but inbox searches return nothing! Could someone help with the email address that it was sent from?

@Elroc
Copy link

Elroc commented Nov 17, 2022

For the life of me not able to find my new API. I knew it came in, but inbox searches return nothing! Could someone help with the email address that it was sent from?

Came from noreply@customers.gumroad.com

@louispires
Copy link

After changing my API 7 hours ago, I realized it wasnt working.

Logs:
`Logger: homeassistant.components.sensor
Source: custom_components/eskom_loadshedding/sensor.py:120
Integration: Sensor (documentation, issues)
First occurred: 15:18:40 (8 occurrences)
Last logged: 22:27:37

Error adding entities for domain sensor with platform eskom_loadshedding
Error while setting up eskom_loadshedding platform for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 428, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 692, in _async_add_entity
await entity.add_to_platform_finish()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 789, in add_to_platform_finish
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 545, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 586, 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
`

@swartjean
Copy link
Owner

Hi @louispires, I'm not sure what to make of that - it looks like the entity was trying to fetch state attributes before they were populated, which would usually point to something going wrong with the request. Can you double check that you are not out of quota for the day?

I should release an update for the API key configuration this weekend.

@louispires
Copy link

@swartjean Yeah I figured maybe the API was not ready yet - Just tried it out now and it Immediately worked.

So all good!

Thanks

@swartjean
Copy link
Owner

I've released this in v1.1.2 - should hopefully make the process easier for users that need to switch keys.

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

6 participants