Skip to content

Fix Report State for Alexa Brightness Controller#12318

Merged
balloob merged 2 commits intohome-assistant:devfrom
lucasweb78:fix-alexa-brightness-controller
Feb 12, 2018
Merged

Fix Report State for Alexa Brightness Controller#12318
balloob merged 2 commits intohome-assistant:devfrom
lucasweb78:fix-alexa-brightness-controller

Conversation

@lucasweb78
Copy link
Copy Markdown
Contributor

@lucasweb78 lucasweb78 commented Feb 11, 2018

Description:

The Report State for Alexa.BrightnessController fails because it assumes brightness is included in the entities properties at all times. This is not the case, brightness is only included when the light is on.

Checklist:

  • The code change is tested and works locally.

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

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

  • Local tests with tox run successfully. Your PR cannot be merged unless tests pass
  • New dependencies have been added to the REQUIREMENTS variable (example).
  • New dependencies are only imported inside functions that use them (example).
  • New 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:

  • Local tests with tox run successfully. Your PR cannot be merged unless tests pass
  • Tests have been added to verify that the new code works.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

line too long (94 > 79 characters)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

line too long (110 > 79 characters)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think this was a mistake, the assert would always exit with a success if the first property was not the one being asserted. This fixes that so all properties are checked and at least one must match the assertion.

@balloob balloob added this to the 0.63.1 milestone Feb 11, 2018
@balloob balloob merged commit 669929d into home-assistant:dev Feb 12, 2018
balloob pushed a commit that referenced this pull request Feb 12, 2018
* Fix Report State for Alexa Brightness Controller

* Lint
@balloob balloob mentioned this pull request Feb 12, 2018
balloob pushed a commit that referenced this pull request Feb 12, 2018
* Fix Report State for Alexa Brightness Controller

* Lint
@home-assistant home-assistant locked and limited conversation to collaborators May 29, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants