Replace Alarm Control Panel FORMAT_ constants with CodeFormat enum (#69861)

This commit is contained in:
Franck Nijhof 2022-04-18 19:37:32 +02:00 committed by GitHub
parent 81f3c82aef
commit 1e4aacaeb1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 65 additions and 47 deletions

View file

@ -6,9 +6,9 @@ import logging
import voluptuous as vol
from homeassistant.components.alarm_control_panel import (
FORMAT_NUMBER,
AlarmControlPanelEntity,
AlarmControlPanelEntityFeature,
CodeFormat,
)
from homeassistant.const import (
ATTR_ENTITY_ID,
@ -145,7 +145,7 @@ class EnvisalinkAlarm(EnvisalinkDevice, AlarmControlPanelEntity):
"""Regex for code format or None if no code is required."""
if self._code:
return None
return FORMAT_NUMBER
return CodeFormat.NUMBER
@property
def state(self):