-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
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
Conversation
More logical to ask "What doors are open" than "What sensors are open"
Can you update our parameterized tests to make sure it works? |
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'), |
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
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.
* 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
* 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
* 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
* 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
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:
tox
. Your PR cannot be merged unless tests passIf user exposed functionality or configuration variables are added/changed:
Documentation added/updated in home-assistant.ioIf 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 torequirements
in the manifest (example).New dependencies are only imported inside functions that use them (example).New or updated dependencies have been added torequirements_all.txt
by runningscript/gen_requirements_all.py
.New files were added to.coveragerc
.If the code does not interact with devices: