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
7 changed files with 32 additions and 14 deletions

View File

@@ -1,7 +1,10 @@
"""Support for MAX! binary sensors via MAX! Cube."""
import logging
from homeassistant.components.binary_sensor import BinarySensorEntity
from homeassistant.components.binary_sensor import (
DEVICE_CLASS_WINDOW,
BinarySensorEntity,
)
from . import DATA_KEY
@@ -30,7 +33,7 @@ class MaxCubeShutter(BinarySensorEntity):
def __init__(self, handler, name, rf_address):
"""Initialize MAX! Cube BinarySensorEntity."""
self._name = name
self._sensor_type = "window"
self._sensor_type = DEVICE_CLASS_WINDOW
self._rf_address = rf_address
self._cubehandle = handler
self._state = None