Mark new gate device class as 2FA (#33541)

This commit is contained in:
Paulus Schoutsen 2020-04-02 13:02:59 -07:00 committed by GitHub
parent 4b2c45e668
commit 6afe6acb6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View File

@ -1247,7 +1247,11 @@ class OpenCloseTrait(_Trait):
"""
# Cover device classes that require 2FA
COVER_2FA = (cover.DEVICE_CLASS_DOOR, cover.DEVICE_CLASS_GARAGE)
COVER_2FA = (
cover.DEVICE_CLASS_DOOR,
cover.DEVICE_CLASS_GARAGE,
cover.DEVICE_CLASS_GATE,
)
name = TRAIT_OPENCLOSE
commands = [COMMAND_OPENCLOSE]

View File

@ -1532,7 +1532,8 @@ async def test_openclose_cover_no_position(hass):
@pytest.mark.parametrize(
"device_class", (cover.DEVICE_CLASS_DOOR, cover.DEVICE_CLASS_GARAGE)
"device_class",
(cover.DEVICE_CLASS_DOOR, cover.DEVICE_CLASS_GARAGE, cover.DEVICE_CLASS_GATE),
)
async def test_openclose_cover_secure(hass, device_class):
"""Test OpenClose trait support for cover domain."""