core
core copied to clipboard
Add account sensors to electric kiwi integration
Breaking change
Proposed change
Add additional Account sensor entities for balance and expenses as well as hour of free power savings percentage.
total running balance total account balance next billing date hop (how much power you've saved) percentage
Type of change
- [ ] Dependency upgrade
- [ ] Bugfix (non-breaking change which fixes an issue)
- [ ] New integration (thank you!)
- [x] New feature (which adds functionality to an existing integration)
- [ ] Deprecation (breaking change to happen in the future)
- [ ] Breaking change (fix/feature causing existing functionality to break)
- [ ] Code quality improvements to existing code or addition of tests
Additional information
- This PR fixes or closes issue: fixes #
- This PR is related to issue:
- Link to documentation pull request: https://github.com/home-assistant/home-assistant.io/pull/28429
Checklist
- [x] The code change is tested and works locally.
- [x] Local tests pass. Your PR cannot be merged unless tests pass
- [x] There is no commented out code in this PR.
- [x] I have followed the development checklist
- [x] I have followed the perfect PR recommendations
- [x] The code has been formatted using Black (
black --fast homeassistant tests) - [ ] Tests have been added to verify that the new code works.
If user exposed functionality or configuration variables are added/changed:
- [ ] Documentation added/updated for www.home-assistant.io
If the code communicates with devices, web services, or third-party tools:
- [ ] The manifest file has all fields filled out correctly.
Updated and included derived files by running:python3 -m script.hassfest. - [ ] New or updated dependencies have been added to
requirements_all.txt.
Updated by runningpython3 -m script.gen_requirements_all. - [ ] For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.
- [ ] Untested files have been added to
.coveragerc.
To help with the load of incoming pull requests:
- [ ] I have reviewed two other open pull requests in this repository.
Need advice, I can add in all the unit tests I've written here, or do it in a seperate PR?
Are they for the new sensor(s) then add them here. For other things do it in separate PR.
Are they for the new sensor(s) then add them here. For other things do it in separate PR.
unfortunately they cover both existing sensor entities (excludes select at the moment) and this PR. I'm looking at how to split them apart but coverage wouldn't be good.
Then for the existing (per platform if different) make PR's for existing setting this PR in draft. Once those has merged we can come back and do this one.
You can ping me in the one you're making for sensor if you want.
Note to self test time stuff with async_fire_time_changed for holistic changes to sensor HOP times.
Would love to see this progress, looks like you were awaiting the merge of #97723 but with this being merged now could this integration pr be revisited? 🙏
PR needs a rebase. Would you continue your work here @mikey0000 👍
Yup I'll get this fixed up
Would love to see this progress, looks like you were awaiting the merge of #97723 but with this being merged now could this integration pr be revisited? 🙏
Hey sorry this fell off the radar, will sort it out.
PR needs a rebase. Would you continue your work here @mikey0000 👍
Hey I've rebased but two tests are failing and I have absolutely no idea why. Python isn't my daily dev language, I'm stumped, help please! It looks like something isn't being awaited properly (race condition) but I cannot work it out.
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks :+1:
Tests are failing
Yes I've tried several times to figure out why, I just don't know why they are failing it's something wrong with how I'm setting up the mocks or async setup. I'll try get some help in discord perhaps
Don't forget to set as "ready for review" if you believe it is or no one will look at it. Thanks 👍
Don't forget to set as "ready for review" if you believe it is or no one will look at it. Thanks 👍
Been away at a funeral, so wasn't high on my list. But thanks for the prompt