From 0c4b308e03ccd605d08b1aa22326308c71db7f31 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Thu, 2 Dec 2021 04:16:09 +0100 Subject: [PATCH] Use device class enum in Stookalert (#60789) --- homeassistant/components/stookalert/binary_sensor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/stookalert/binary_sensor.py b/homeassistant/components/stookalert/binary_sensor.py index d41e24f7c94..b606e3f3d3b 100644 --- a/homeassistant/components/stookalert/binary_sensor.py +++ b/homeassistant/components/stookalert/binary_sensor.py @@ -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."""