Use opening and occupancy device class in various integrations (#39965)
This commit is contained in:
parent
4c0f075d6a
commit
cee96ae207
14 changed files with 62 additions and 25 deletions
|
@ -4,6 +4,7 @@ from typing import Optional, Sequence
|
|||
from pysmartthings import Attribute, Capability
|
||||
|
||||
from homeassistant.components.binary_sensor import (
|
||||
DEVICE_CLASS_OPENING,
|
||||
DEVICE_CLASS_SOUND,
|
||||
BinarySensorEntity,
|
||||
)
|
||||
|
@ -24,13 +25,13 @@ CAPABILITY_TO_ATTRIB = {
|
|||
}
|
||||
ATTRIB_TO_CLASS = {
|
||||
Attribute.acceleration: "moving",
|
||||
Attribute.contact: "opening",
|
||||
Attribute.contact: DEVICE_CLASS_OPENING,
|
||||
Attribute.filter_status: "problem",
|
||||
Attribute.motion: "motion",
|
||||
Attribute.presence: "presence",
|
||||
Attribute.sound: DEVICE_CLASS_SOUND,
|
||||
Attribute.tamper: "problem",
|
||||
Attribute.valve: "opening",
|
||||
Attribute.valve: DEVICE_CLASS_OPENING,
|
||||
Attribute.water: "moisture",
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue