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:
springstan 2020-09-12 02:37:33 +02:00 committed by GitHub
parent ee5c1ea3f7
commit ac2e290d97
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 36 additions and 19 deletions

View file

@ -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",