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

Expose door cover/binary_sensor as door type #23307

Merged
merged 4 commits into from
Apr 24, 2019

Conversation

elupus
Copy link
Contributor

@elupus elupus commented Apr 22, 2019

Description:

More logical to ask "What doors are open" than "What sensors are open".

Since sensors type is a unsupported type, we might as well use the correct unsupported type
of doors.

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:

  • The manifest file has all fields filled out correctly (example).
  • New dependencies have been added to requirements in the manifest (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.

More logical to ask "What doors are open" than "What sensors are open"
@balloob
Copy link
Member

balloob commented Apr 22, 2019

Can you update our parameterized tests to make sure it works?

@balloob balloob added this to the 0.92.0 milestone Apr 22, 2019
@balloob
Copy link
Member

balloob commented Apr 22, 2019

Tagging for 92 so people won't have device type changing on them.

@@ -598,6 +600,89 @@ def registries(hass):
}


@pytest.mark.parametrize("device_class,google_type", [
('door', 'action.devices.types.DOOR'),
('garage_door', 'action.devices.types.SENSOR'),
Copy link
Member

Choose a reason for hiding this comment

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

This seems incorrect, as we have this map to TYPE_GARAGE ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not currently for the binary sensor only for cover.

@balloob balloob merged commit 7c55b9f into home-assistant:dev Apr 24, 2019
balloob pushed a commit that referenced this pull request Apr 24, 2019
* Expose door cover/binary_sensor as door type

More logical to ask "What doors are open" than "What sensors are open"

* Add test for binary_sensor device_classes

* Cosmetic flake8

* Add test for device class for cover
@elupus elupus deleted the device_class_door branch May 2, 2019 10:55
fredrikbaberg pushed a commit to fredrikbaberg/home-assistant that referenced this pull request May 6, 2019
* Expose door cover/binary_sensor as door type

More logical to ask "What doors are open" than "What sensors are open"

* Add test for binary_sensor device_classes

* Cosmetic flake8

* Add test for device class for cover
fredrikbaberg pushed a commit to fredrikbaberg/home-assistant that referenced this pull request May 6, 2019
* Expose door cover/binary_sensor as door type

More logical to ask "What doors are open" than "What sensors are open"

* Add test for binary_sensor device_classes

* Cosmetic flake8

* Add test for device class for cover
fredrikbaberg pushed a commit to fredrikbaberg/home-assistant that referenced this pull request May 6, 2019
* Expose door cover/binary_sensor as door type

More logical to ask "What doors are open" than "What sensors are open"

* Add test for binary_sensor device_classes

* Cosmetic flake8

* Add test for device class for cover
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.

3 participants