Use opening and occupancy device class in various integrations (#39965)

This commit is contained in:
springstan authored and GitHub committed 2020-09-12 18:07:13 +02:00
1 parent 4c0f075d6a
commit cee96ae207
14 files changed
+62 -25

No files matched your search

@@ -7,6 +7,7 @@ import requests
import voluptuous as vol
from homeassistant.components.binary_sensor import (
DEVICE_CLASS_OPENING,
DEVICE_CLASS_SAFETY,
DEVICE_CLASS_SMOKE,
DEVICE_CLASSES,
@@ -94,7 +95,7 @@ def get_opening_type(zone):
return DEVICE_CLASS_SMOKE
if "WATER" in zone["name"]:
return "water"
return "opening"
return DEVICE_CLASS_OPENING
class Concord232ZoneSensor(BinarySensorEntity):