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

Allow emulated hue to set climate component temperature #19034

Merged
merged 1 commit into from
Mar 10, 2019
Merged

Allow emulated hue to set climate component temperature #19034

merged 1 commit into from
Mar 10, 2019

Conversation

chilicheech
Copy link
Contributor

@chilicheech chilicheech commented Dec 5, 2018

Description:

This enables the emulated_hue component to set the temperature of climate devices.

The goal here is not to have the thermostat show up as a thermostat in Alexa, because with emulated hue it will show up as a light. The goal is simply to be able to say “Alexa, set the heater to 66” and have it set the thermostat temperature in that way. Things like “Alexa, raise the temperature” or “Alexa, I’m cold” or “Alexa, turn on the heater” won’t work. Only specifically setting the temperature will work.

This change makes it do the same thing it does for setting media player volume. The emulated_hue will “pretend” the thermostat is a light and use the brightness level as the temperature for the thermostat. This is the same thing it already does to media players. It uses the brightness level as the volume level.

Related issue (if applicable): This implements the feature requested here: https://community.home-assistant.io/t/emulated-hue-should-support-climate-thermostats/82702

Pull request in home-assistant.io with documentation (if applicable): There doesn't seem to be any home-assistant.io changes needed.

Example entry for configuration.yaml (if applicable):

emulated_hue:
  host_ip: x.x.x.x
  expose_by_default: false
  entities:
    climate.heater:
      hidden: false

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.

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

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/gen_requirements_all.py.
  • New files were added to .coveragerc.

If the code does not interact with devices:

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

@fabaff fabaff changed the title allow emulated hue to set climate component temperature Allow emulated hue to set climate component temperature Dec 5, 2018
Copy link
Contributor

@amelchio amelchio left a comment

Choose a reason for hiding this comment

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

If you can fix the conflicts that have emerged, I think this is good.

tests/components/emulated_hue/test_hue_api.py Outdated Show resolved Hide resolved
tests/components/emulated_hue/test_hue_api.py Outdated Show resolved Hide resolved
tests/components/emulated_hue/test_hue_api.py Outdated Show resolved Hide resolved
@chilicheech
Copy link
Contributor Author

@amelchio merge conflicts fixed 😄

Copy link
Contributor

@amelchio amelchio 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 to me 👍

@amelchio amelchio merged commit 77dc759 into home-assistant:dev Mar 10, 2019
@ghost ghost removed the in progress label Mar 10, 2019
@home-assistant home-assistant deleted a comment from homeassistant Mar 10, 2019
@balloob balloob mentioned this pull request Mar 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants