Use sound, vibration and safety device class constants in various integrations (#39952)
* Use sound, vibration and safety device class constants in various integrations * Fix wrong imports
This commit is contained in:
1 parent
ee5c1ea3f7
commit
ac2e290d97
7 files changed
+36
-19
No files matched your search
@@ -3,7 +3,10 @@ from typing import Optional, Sequence
|
||||
|
||||
from pysmartthings import Attribute, Capability
|
||||
|
||||
from homeassistant.components.binary_sensor import BinarySensorEntity
|
||||
from homeassistant.components.binary_sensor import (
|
||||
DEVICE_CLASS_SOUND,
|
||||
BinarySensorEntity,
|
||||
)
|
||||
|
||||
from . import SmartThingsEntity
|
||||
from .const import DATA_BROKERS, DOMAIN
|
||||
@@ -25,7 +28,7 @@ ATTRIB_TO_CLASS = {
|
||||
Attribute.filter_status: "problem",
|
||||
Attribute.motion: "motion",
|
||||
Attribute.presence: "presence",
|
||||
Attribute.sound: "sound",
|
||||
Attribute.sound: DEVICE_CLASS_SOUND,
|
||||
Attribute.tamper: "problem",
|
||||
Attribute.valve: "opening",
|
||||
Attribute.water: "moisture",
|
||||
|
||||
Reference in new issue
Block a user