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

Eight Sleep add REM type, Update async syntax, Catch API quirks #14937

merged 1 commit into from Jun 15, 2018


None yet
5 participants

mezz64 commented Jun 12, 2018


Bump pyEight version and add atributes to support new REM sleep type.
Update to new async syntax.
Catch possible None values for temperature before rounding.

Remove "Last in Bed" attribute since it is no longer updated accurately in the API. This is a breaking change for anyone using that attribute in an automation.

Related issue (if applicable): fixes #14492

Pull request in with documentation (if applicable): N/A

Example entry for configuration.yaml (if applicable):


  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass

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

  • New dependencies have been added to the REQUIREMENTS variable (example).
  • New dependencies are only imported inside functions that use them (example).
  • New or updated dependencies have been added to requirements_all.txt by running script/
@@ -255,15 +269,17 @@ def state(self):
"""Return the state of the sensor."""
return self._state
def async_update(self):
async def async_update(self):
"""Retrieve latest state."""
_LOGGER.debug("Updating Room sensor: %s", self._sensor)
temp = self._eight.room_temperature()

This comment has been minimized.


bachya Jun 14, 2018


Does this method call do any I/O? If it does and it's not awaited properly, you're going to lock the event loop.

This comment has been minimized.


mezz64 Jun 15, 2018


It does not. All the I/O happens in the async_update_heat_data and async_update_user_data functions in the master component file. You can see the library room_temperature() function here:

@balloob balloob merged commit 9efa31e into home-assistant:dev Jun 15, 2018

5 checks passed

Hound No violations found. Woof!
WIP ready for review
cla-bot Everyone involved has signed the CLA
continuous-integration/travis-ci/pr The Travis CI build passed
coverage/coveralls Coverage decreased (-0.003%) to 93.998%

@wafflebot wafflebot bot removed the in progress label Jun 15, 2018

@balloob balloob referenced this pull request Jun 22, 2018


0.72 #15088

MizterB added a commit to MizterB/home-assistant that referenced this pull request Aug 11, 2018

cyberjacob pushed a commit to cyberjacob/home-assistant that referenced this pull request Sep 4, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment