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

Home Assistant Integration #32

Open
yourgeekguy opened this issue Sep 2, 2022 · 9 comments
Open

Home Assistant Integration #32

yourgeekguy opened this issue Sep 2, 2022 · 9 comments

Comments

@yourgeekguy
Copy link

I've been trying to figure out your code here. I'm not very good with these kinds of things, but really was hoping to get this implemented in Home Assistant. I've tried a few different methods mentioned in other issues like this one -> #8

Is there a more clear "how-to" documentation on how to get this integrated into Home Assistant? Can anyone that has effectively done so create a video or share more details on how you integrated it?

@thebradleysanders
Copy link
Contributor

I am working on this and will have it done soon. Updates can be seen at: https://github.com/thebradleysanders/evergy

@yourgeekguy
Copy link
Author

Oh this is awesome! I actually started using Browse AI to scrape the Evergy site then using their API was able to get that into HASS, but it's not very good. Some days it still misses the scrape, but it's better than nothing. Excited to implement your code here again and see if I can get it working.

@lawrencefoley
Copy link
Owner

@thebradleysanders This is great! Glad to see someone's working on an integration!

I'll definitely add a link to your repo.

@thebradleysanders
Copy link
Contributor

Thank you, I am glad I could help! As I continue to work on it, please let me know if there are any issues or other sensors you want added.

@yourgeekguy
Copy link
Author

@thebradleysanders I just tried installing via HACS. It doesn't seem to be exposing any sensors yet for me. I put in my username and password for Evergy, and then nothing. Am I too early trying to use this or should it be working already? What can I do to help here?

@thebradleysanders
Copy link
Contributor

I had a bug that should now be resolved, please update and try again.

@yourgeekguy
Copy link
Author

Just reloaded and the sensor shows available now, but still no luck getting them to load values. Plus, i'm getting an error in the logs now. See below.

This error originated from a custom integration.

Logger: homeassistant.loader
Source: custom_components/evergy/sensor.py:28
Integration: Evergy (documentation)
First occurred: 5:11:06 PM (1 occurrences)
Last logged: 5:11:06 PM

Unexpected exception importing platform custom_components.evergy.sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/loader.py", line 779, in get_platform
cache[full_name] = self._import_platform(platform_name)
File "/usr/src/homeassistant/homeassistant/loader.py", line 796, in _import_platform
return importlib.import_module(f"{self.pkg_path}.{platform_name}")
File "/usr/local/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "/config/custom_components/evergy/sensor.py", line 28, in
SCAN_INTERVAL = timedelta(seconds=10800)
NameError: name 'timedelta' is not defined

Logger: homeassistant.setup
Source: setup.py:344
First occurred: 5:11:06 PM (1 occurrences)
Last logged: 5:11:06 PM

Unable to prepare setup for platform evergy.sensor: Platform not found (Exception importing custom_components.evergy.sensor).

@thebradleysanders
Copy link
Contributor

still no luck getting them to load values

Were you able to get this working?

@yourgeekguy
Copy link
Author

@thebradleysanders I was stalling to respond as I haven't had a ton of time to review since the other day. I did notice you had some additional updates. I have implemented them and reboot, and so far it looks good! I'll let you know if i run into any other issues! this is great! Now if I can figure out something with KC Water and Spire I'd be set. I may use Browse AI to help out with those for now.

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

3 participants