Use new enums in hydrawise (#61781)

Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
epenet 2021-12-14 13:06:55 +01:00 committed by GitHub
parent a28ce75a92
commit 237a8a8331
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 13 deletions

View file

@ -6,9 +6,8 @@ import logging
import voluptuous as vol
from homeassistant.components.binary_sensor import (
DEVICE_CLASS_CONNECTIVITY,
DEVICE_CLASS_MOISTURE,
PLATFORM_SCHEMA,
BinarySensorDeviceClass,
BinarySensorEntity,
BinarySensorEntityDescription,
)
@ -22,14 +21,14 @@ _LOGGER = logging.getLogger(__name__)
BINARY_SENSOR_STATUS = BinarySensorEntityDescription(
key="status",
name="Status",
device_class=DEVICE_CLASS_CONNECTIVITY,
device_class=BinarySensorDeviceClass.CONNECTIVITY,
)
BINARY_SENSOR_TYPES: tuple[BinarySensorEntityDescription, ...] = (
BinarySensorEntityDescription(
key="is_watering",
name="Watering",
device_class=DEVICE_CLASS_MOISTURE,
device_class=BinarySensorDeviceClass.MOISTURE,
),
)