mirror of
https://github.com/home-assistant/core.git
synced 2025-11-15 22:10:09 +00:00
Use opening and occupancy device class in various integrations (#39965)
This commit is contained in:
@@ -1,9 +1,15 @@
|
||||
"""Support for the Hive binary sensors."""
|
||||
from homeassistant.components.binary_sensor import BinarySensorEntity
|
||||
from homeassistant.components.binary_sensor import (
|
||||
DEVICE_CLASS_OPENING,
|
||||
BinarySensorEntity,
|
||||
)
|
||||
|
||||
from . import DATA_HIVE, DOMAIN, HiveEntity
|
||||
|
||||
DEVICETYPE_DEVICE_CLASS = {"motionsensor": "motion", "contactsensor": "opening"}
|
||||
DEVICETYPE_DEVICE_CLASS = {
|
||||
"motionsensor": "motion",
|
||||
"contactsensor": DEVICE_CLASS_OPENING,
|
||||
}
|
||||
|
||||
|
||||
def setup_platform(hass, config, add_entities, discovery_info=None):
|
||||
|
||||
Reference in New Issue
Block a user