mirror of
https://github.com/home-assistant/core.git
synced 2026-05-05 20:34:52 +02:00
Use opening and occupancy device class in various integrations (#39965)
This commit is contained in:
@@ -2,7 +2,10 @@
|
||||
from datetime import datetime
|
||||
import logging
|
||||
|
||||
from homeassistant.components.binary_sensor import BinarySensorEntity
|
||||
from homeassistant.components.binary_sensor import (
|
||||
DEVICE_CLASS_OCCUPANCY,
|
||||
BinarySensorEntity,
|
||||
)
|
||||
from homeassistant.core import callback
|
||||
|
||||
from . import DOMAIN
|
||||
@@ -12,7 +15,7 @@ _LOGGER = logging.getLogger(__name__)
|
||||
|
||||
# Sensor types: Name, category, device_class
|
||||
SENSOR_TYPES = {
|
||||
"ding": ["Ding", ["doorbots", "authorized_doorbots"], "occupancy"],
|
||||
"ding": ["Ding", ["doorbots", "authorized_doorbots"], DEVICE_CLASS_OCCUPANCY],
|
||||
"motion": ["Motion", ["doorbots", "authorized_doorbots", "stickup_cams"], "motion"],
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user