mirror of
https://github.com/home-assistant/core.git
synced 2025-11-24 10:16:58 +00:00
Use opening and occupancy device class in various integrations (#39965)
This commit is contained in:
@@ -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,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user