Use moisture and moving device class in various integrations (#39963)
This commit is contained in:
parent
ceeea52915
commit
621526bbae
11 changed files with 38 additions and 17 deletions
|
@ -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."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue