Clean up entity descriptions in Tuya (#96847)

This commit is contained in:
Joost Lekkerkerker 2023-07-18 17:41:33 +02:00 committed by GitHub
parent d8c989f732
commit 1422a4f8c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions

View File

@ -53,7 +53,7 @@ BINARY_SENSORS: dict[str, tuple[TuyaBinarySensorEntityDescription, ...]] = {
key=DPCode.GAS_SENSOR_STATE,
name="Gas",
icon="mdi:gas-cylinder",
device_class=BinarySensorDeviceClass.SAFETY,
device_class=BinarySensorDeviceClass.GAS,
on_value="alarm",
),
TuyaBinarySensorEntityDescription(

View File

@ -9,7 +9,7 @@ from homeassistant.components.number import (
NumberEntityDescription,
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import EntityCategory, UnitOfTime
from homeassistant.const import PERCENTAGE, EntityCategory, UnitOfTime
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.dispatcher import async_dispatcher_connect
from homeassistant.helpers.entity_platform import AddEntitiesCallback
@ -264,14 +264,16 @@ NUMBERS: dict[str, tuple[NumberEntityDescription, ...]] = {
"szjqr": (
NumberEntityDescription(
key=DPCode.ARM_DOWN_PERCENT,
name="Move down %",
name="Move down",
icon="mdi:arrow-down-bold",
native_unit_of_measurement=PERCENTAGE,
entity_category=EntityCategory.CONFIG,
),
NumberEntityDescription(
key=DPCode.ARM_UP_PERCENT,
name="Move up %",
name="Move up",
icon="mdi:arrow-up-bold",
native_unit_of_measurement=PERCENTAGE,
entity_category=EntityCategory.CONFIG,
),
NumberEntityDescription(