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

Tweak geniushub and bump client to v0.6.26 #26640

Merged
merged 55 commits into from Oct 2, 2019

Conversation

@zxdavb
Copy link
Contributor

commented Sep 14, 2019

Breaking Change:

Those connecting to a Hub via the v1 API will need to specify a valid MAC address for the hub (see example YAML, below). Those using the v3 API will be unaffected.

This is so that in an upcoming PR, the geniushub entities can be given more appropriateentity_ids.

Some Sensor entities fro GeniusHub Issues have been renamed, and so will get a new entity ID:

  • sensor.errors to sensor.geniushub_errors
  • sensor.warnings to sensor.geniushub_warnings
  • sensor.information to sensor.geniushub_information

This is to address the issue that (e.g.) sensor.errors clearly has the potential to be not unique across the sensors platform.

Description:

  • additional device_state_attributes, e.g. setback for TRVs
  • handles more (all?) SKUs, e.g. single channel receivers, older room thermostats
  • adds new Climate zone type: wet underfloor heating
  • device state atrributes now in snake_case
  • several small tweaks (e.g. better error messages), added resilience
  • bumps client (see below) with those benefits

Refactor (consolidate) by creating GeniusZone, GeniusDevice classes in __init__.py and moving code across from climate/water_heater, sensor/binary_sensor.

Bumps client to v0.6.26:

  • aware of new Sense mode (but for v3 API only)
  • should now handle all known SKUs
  • correctly handles wet underfloor zones
  • no longer confused by Group zones
  • when polling, doesn't repeat logger.warning()s for persisting Issues
  • handles more edge cases (e.g. a HW controller with a PIR)
  • add Hub UID for unique_id

The newer client also adds useful data which is not currently part of the (published) v1 API

  • adds device.data["_config"] (e.g. SKU) and device.data["_state"] (e.g. TRV setback)
  • adds zone.data["_occupied"] if has a PIR which is not exposed by v1 API
  • adds zone.data["_schedule"]["footprint"]["profile"] (comfort, eco, super-eco)

See: zxdavb/geniushub-client@v0.6.13...v0.6.26

Related issue (if applicable): N/A

Pull request with documentation for home-assistant.io (if applicable): home-assistant/home-assistant.io#10443

Example entry for configuration.yaml (if applicable):

geniushub:
  token: JqVFd0UUEi...
  mac: 18:CC:23:12:34:56

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.
zxdavb added 5 commits Sep 12, 2019
@project-bot project-bot bot added this to Needs review in Dev Sep 14, 2019
@MartinHjelmare MartinHjelmare moved this from Needs review to Incoming in Dev Sep 14, 2019
zxdavb added 2 commits Sep 16, 2019
@zxdavb zxdavb marked this pull request as ready for review Sep 18, 2019
@zxdavb zxdavb requested a review from MartinHjelmare Sep 18, 2019
@MartinHjelmare MartinHjelmare moved this from Incoming to Needs review in Dev Sep 18, 2019
@zxdavb zxdavb changed the title Geniushub tweak Tweak geniushub and Bump client to v0.6.20 Sep 20, 2019
zxdavb added 4 commits Sep 20, 2019
zxdavb added 3 commits Oct 1, 2019
@zxdavb zxdavb changed the title Tweak geniushub and bump client to v0.6.25 Tweak geniushub and bump client to v0.6.26 Oct 1, 2019
@zxdavb

This comment has been minimized.

Copy link
Contributor Author

commented Oct 2, 2019

@MartinHjelmare can we fit this in today?

zxdavb added 3 commits Oct 2, 2019
zxdavb and others added 5 commits Oct 2, 2019
Co-Authored-By: Martin Hjelmare <marhje52@kth.se>
Co-Authored-By: Martin Hjelmare <marhje52@kth.se>
zxdavb added 4 commits Oct 2, 2019
Copy link
Member

left a comment

Looks good!

Dev automation moved this from Review in progress to Reviewer approved Oct 2, 2019
@zxdavb

This comment has been minimized.

Copy link
Contributor Author

commented Oct 2, 2019

Looks good!

Thanks!

@zxdavb zxdavb merged commit c78b3a4 into home-assistant:dev Oct 2, 2019
11 checks passed
11 checks passed
CI Build #20191002.64 succeeded
Details
CI (FullCheck Mypy) FullCheck Mypy succeeded
Details
CI (FullCheck Pylint) FullCheck Pylint succeeded
Details
CI (Overview CheckFormat) Overview CheckFormat succeeded
Details
CI (Overview Lint) Overview Lint succeeded
Details
CI (Overview Validate) Overview Validate 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
codecov/patch Coverage not affected when comparing a1997ee...67affb1
Details
codecov/project 94.32% (target 90%)
Details
Dev automation moved this from Reviewer approved to Done Oct 2, 2019
@zxdavb zxdavb deleted the zxdavb:geniushub_tweak branch Oct 2, 2019
@lock lock bot locked and limited conversation to collaborators Oct 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Dev
  
Done
3 participants
You can’t perform that action at this time.