Use device class enum in Stookalert (#60789)

pull/60816/head
Franck Nijhof 2021-12-02 04:16:09 +01:00 committed by GitHub
parent 58fdcfb6b8
commit 0c4b308e03
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -7,8 +7,8 @@ import stookalert
import voluptuous as vol
from homeassistant.components.binary_sensor import (
DEVICE_CLASS_SAFETY,
PLATFORM_SCHEMA,
BinarySensorDeviceClass,
BinarySensorEntity,
)
from homeassistant.config_entries import SOURCE_IMPORT, ConfigEntry
@ -72,7 +72,7 @@ class StookalertBinarySensor(BinarySensorEntity):
"""Defines a Stookalert binary sensor."""
_attr_attribution = ATTRIBUTION
_attr_device_class = DEVICE_CLASS_SAFETY
_attr_device_class = BinarySensorDeviceClass.SAFETY
def __init__(self, client: stookalert.stookalert, entry: ConfigEntry) -> None:
"""Initialize a Stookalert device."""