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

[climate] Add water_heater to evohome #25035

Merged
merged 32 commits into from Jul 12, 2019

Conversation

@zxdavb
Copy link
Contributor

commented Jul 9, 2019

Breaking Change:

Description:

Adds water_heater to evohome - this is required to support those moving from honeywell, which has deprecated EU support.

Also switches a lot of async to sync.

Also addresses:

  • a KeyError Exception for systems with DHW controllers
  • handle systems that have no schedule
  • improved compatibility with RoundThermostat, which has moved over from honeywell
  • edge cases where access tokens would not be stored when required

Related issue (if applicable): fixes #

Pull request with documentation for home-assistant.io (if applicable): home-assistant/home-assistant.io#<home-assistant.io PR number goes here>

Example entry for configuration.yaml (if applicable):

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly. Update and include derived files by running python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt by running python3 -m script.gen_requirements_all.
  • Untested files have been added to .coveragerc.

If the code does not interact with devices:

  • Tests have been added to verify that the new code works.

@frenck frenck added the climate label Jul 9, 2019

zxdavb added some commits Jul 9, 2019

@zxdavb zxdavb referenced this pull request Jul 9, 2019
9 of 9 tasks complete

zxdavb added some commits Jul 9, 2019

@zxdavb zxdavb changed the title [climate] Add water_heater to evohome WIP: DONT MERGE [climate] Add water_heater to evohome DONT MERGE Jul 9, 2019

@zxdavb zxdavb changed the title WIP: DONT MERGE [climate] Add water_heater to evohome DONT MERGE [climate] Add water_heater to evohome Jul 9, 2019

zxdavb added some commits Jul 9, 2019

@zxdavb

This comment has been minimized.

Copy link
Contributor Author

commented Jul 10, 2019

@pvizeli Would you kindly look at this? I think I've moved out all the async as requested. It also has a number of fixes for bugs found by people testing for me, and adds water_heater, whihc @balloob said would be OK to add with climate-1.0.

zxdavb added some commits Jul 10, 2019

zxdavb added some commits Jul 10, 2019

zxdavb added some commits Jul 11, 2019

@pvizeli
Copy link
Member

left a comment

Looks fine. The only point to solve is datetime handling 👍

homeassistant/components/evohome/__init__.py Outdated Show resolved Hide resolved

zxdavb added some commits Jul 11, 2019

@balloob balloob added this to the 0.96.0 milestone Jul 12, 2019

@zxdavb

This comment has been minimized.

Copy link
Contributor Author

commented Jul 12, 2019

@balloob I'm not intending to make any more changes to this, if you'd like to merge it. I has essentially passed QI.

@balloob
Copy link
Member

left a comment

This looks good.

I did make one change and moved conversion to local datetime next to where we send it out to the lib. Generally, we don't want to have any non-UTC timestamps pass through any of our code, because it leads to confusion.

@pvizeli pvizeli merged commit de43237 into home-assistant:dev Jul 12, 2019

8 of 9 checks passed

CI (Overview Validate)
Details
CI Build #20190712.52 succeeded
Details
CI (FullCheck Mypy) FullCheck Mypy succeeded
Details
CI (FullCheck Pytlint) FullCheck Pytlint succeeded
Details
CI (Overview Lint) Overview Lint succeeded
Details
CI (Tests PyTest Python35) Tests PyTest Python35 succeeded
Details
CI (Tests PyTest Python36) Tests PyTest Python36 succeeded
Details
CI (Tests PyTest Python37) Tests PyTest Python37 succeeded
Details
cla-bot Everyone involved has signed the CLA
@zxdavb

This comment has been minimized.

Copy link
Contributor Author

commented Jul 12, 2019

Woot! 💐 Thanks everyone!

balloob added a commit that referenced this pull request Jul 12, 2019

[climate] Add water_heater to evohome (#25035)
* initial commit

* refactor for sync

* minor tweak

* refactor convert code

* fix regression

* remove bad await

* de-lint

* de-lint 2

* address edge case - invalid tokens

* address edge case - delint

* handle no schedule

* improve support for RoundThermostat

* tweak logging

* delint

* refactor for greatness

* use time_zone: for state attributes

* small tweak

* small tweak 2

* have datetime state attributes as UTC

* have datetime state attributes as UTC - delint

* have datetime state attributes as UTC - tweak

* missed this - remove

* de-lint type hint

* use parse_datetime instead of datetime.strptime)

* remove debug code

* state atrribute datetimes are UTC now

* revert

* de-lint (again)

* tweak type hints

* de-lint (again, again)

* tweak type hints

* Convert datetime closer to sending it out

@zxdavb zxdavb deleted the zxdavb:add_evohome_waterheater branch Jul 13, 2019

@lock lock bot locked and limited conversation to collaborators Jul 14, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.