Use DEVICE_CLASS_WINDOW constant in various integrations (#39949)

This commit is contained in:
springstan 2020-09-12 04:24:23 +02:00 committed by GitHub
parent a6d3ee90f0
commit f93c0c5cd3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 32 additions and 14 deletions

View file

@ -1,7 +1,10 @@
"""Support for Fritzbox binary sensors."""
import requests
from homeassistant.components.binary_sensor import BinarySensorEntity
from homeassistant.components.binary_sensor import (
DEVICE_CLASS_WINDOW,
BinarySensorEntity,
)
from homeassistant.const import CONF_DEVICES
from .const import CONF_CONNECTIONS, DOMAIN as FRITZBOX_DOMAIN, LOGGER
@ -53,7 +56,7 @@ class FritzboxBinarySensor(BinarySensorEntity):
@property
def device_class(self):
"""Return the class of this sensor."""
return "window"
return DEVICE_CLASS_WINDOW
@property
def is_on(self):