Add SmartThingsAccelCluster to ZHA binary_sensor (#21609)

* Add SmartThingsAccelCluster to binary_sensor

* Make corrections per discussion with @dmulcahey

* Add missing const to gateway.py

* Remove Acceleration from no sensor
This commit is contained in:
roblandry 2019-03-04 18:56:05 -05:00 committed by Paulus Schoutsen
parent 4a3b4cf346
commit e10e27d809
3 changed files with 7 additions and 4 deletions

View file

@ -12,7 +12,7 @@ from .core.const import (
DATA_ZHA, DATA_ZHA_DISPATCHERS, ZHA_DISCOVERY_NEW, ON_OFF_CHANNEL,
LEVEL_CHANNEL, ZONE_CHANNEL, SIGNAL_ATTR_UPDATED, SIGNAL_MOVE_LEVEL,
SIGNAL_SET_LEVEL, ATTRIBUTE_CHANNEL, UNKNOWN, OPENING, ZONE, OCCUPANCY,
ATTR_LEVEL, SENSOR_TYPE)
ATTR_LEVEL, SENSOR_TYPE, ACCELERATION)
from .entity import ZhaEntity
_LOGGER = logging.getLogger(__name__)
@ -41,6 +41,7 @@ DEVICE_CLASS_REGISTRY = {
OPENING: OPENING,
ZONE: get_ias_device_class,
OCCUPANCY: OCCUPANCY,
ACCELERATION: 'moving',
}