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

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

View File

@@ -4,6 +4,8 @@ import logging
import pywink
from homeassistant.components.binary_sensor import (
DEVICE_CLASS_OCCUPANCY,
DEVICE_CLASS_OPENING,
DEVICE_CLASS_SMOKE,
DEVICE_CLASS_SOUND,
DEVICE_CLASS_VIBRATION,
@@ -24,8 +26,8 @@ SENSOR_TYPES = {
"loudness": DEVICE_CLASS_SOUND,
"motion": "motion",
"noise": DEVICE_CLASS_SOUND,
"opened": "opening",
"presence": "occupancy",
"opened": DEVICE_CLASS_OPENING,
"presence": DEVICE_CLASS_OCCUPANCY,
"smoke_detected": DEVICE_CLASS_SMOKE,
"vibration": DEVICE_CLASS_VIBRATION,
}