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
Merged

[climate] Add water_heater to evohome #25035

merged 32 commits into from Jul 12, 2019

Conversation

zxdavb
Copy link
Contributor

@zxdavb zxdavb 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 zxdavb mentioned this pull request Jul 9, 2019
9 tasks
@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
Copy link
Contributor Author

zxdavb 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.

Copy link
Member

@pvizeli pvizeli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

homeassistant/components/evohome/__init__.py Outdated Show resolved Hide resolved
@balloob balloob added this to the 0.96.0 milestone Jul 12, 2019
@zxdavb
Copy link
Contributor Author

zxdavb 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.

Copy link
Member

@balloob balloob left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
@zxdavb
Copy link
Contributor Author

zxdavb commented Jul 12, 2019

Woot! 💐 Thanks everyone!

balloob pushed a commit that referenced this pull request Jul 12, 2019
* 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 add_evohome_waterheater branch July 13, 2019 09:19
@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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants