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
Merged

Tweak geniushub and bump client to v0.6.26 #26640

merged 55 commits into from Oct 2, 2019

Conversation

zxdavb
Copy link
Contributor

@zxdavb zxdavb 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: manzanotti/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.

@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 zxdavb marked this pull request as ready for review September 18, 2019 14:24
@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 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
Copy link
Contributor Author

zxdavb commented Oct 2, 2019

@MartinHjelmare can we fit this in today?

homeassistant/components/geniushub/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/geniushub/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/geniushub/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/geniushub/binary_sensor.py Outdated Show resolved Hide resolved
homeassistant/components/geniushub/__init__.py Outdated Show resolved Hide resolved
Copy link
Member

@MartinHjelmare MartinHjelmare left a comment

Choose a reason for hiding this comment

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

Looks good!

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

zxdavb commented Oct 2, 2019

Looks good!

Thanks!

@zxdavb zxdavb merged commit c78b3a4 into home-assistant:dev Oct 2, 2019
Dev automation moved this from Reviewer approved to Done Oct 2, 2019
@zxdavb zxdavb deleted the geniushub_tweak branch October 2, 2019 16:28
@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
Development

Successfully merging this pull request may close these issues.

None yet

3 participants