Use DeviceClass Enum in alarmdecoder schema ()

pull/63224/head
epenet 2022-01-02 16:01:00 +01:00 committed by GitHub
parent fc02260146
commit 631e4c6bd3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions
homeassistant/components/alarmdecoder

View File

@ -7,7 +7,9 @@ from alarmdecoder.util import NoDeviceError
import voluptuous as vol
from homeassistant import config_entries
from homeassistant.components.binary_sensor import DEVICE_CLASSES
from homeassistant.components.binary_sensor import (
DEVICE_CLASSES_SCHEMA as BINARY_SENSOR_DEVICE_CLASSES_SCHEMA,
)
from homeassistant.const import CONF_HOST, CONF_PORT, CONF_PROTOCOL
from homeassistant.core import callback
@ -248,7 +250,7 @@ class AlarmDecoderOptionsFlowHandler(config_entries.OptionsFlow):
default=existing_zone_settings.get(
CONF_ZONE_TYPE, DEFAULT_ZONE_TYPE
),
): vol.In(DEVICE_CLASSES),
): BINARY_SENSOR_DEVICE_CLASSES_SCHEMA,
vol.Optional(
CONF_ZONE_RFID,
description={