Use moisture and moving device class in various integrations (#39963)
This commit is contained in:
1 parent
ceeea52915
commit
621526bbae
11 files changed
+38
-17
No files matched your search
@@ -4,6 +4,7 @@ import logging
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.binary_sensor import (
|
||||
DEVICE_CLASS_MOVING,
|
||||
DEVICE_CLASSES_SCHEMA,
|
||||
PLATFORM_SCHEMA,
|
||||
BinarySensorEntity,
|
||||
@@ -43,7 +44,7 @@ class AdsBinarySensor(AdsEntity, BinarySensorEntity):
|
||||
def __init__(self, ads_hub, name, ads_var, device_class):
|
||||
"""Initialize ADS binary sensor."""
|
||||
super().__init__(ads_hub, name, ads_var)
|
||||
self._device_class = device_class or "moving"
|
||||
self._device_class = device_class or DEVICE_CLASS_MOVING
|
||||
|
||||
async def async_added_to_hass(self):
|
||||
"""Register device notification."""
|
||||
|
||||
Reference in new issue
Block a user