Add YoLink YS6614 support. (#149153)

This commit is contained in:
Matrix 2025-07-28 23:43:20 +08:00 committed by GitHub
parent 92ad922ddc
commit aa1314c1d5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 15 additions and 0 deletions

View File

@ -32,6 +32,8 @@ DEV_MODEL_FLEX_FOB_YS3614_UC = "YS3614-UC"
DEV_MODEL_FLEX_FOB_YS3614_EC = "YS3614-EC"
DEV_MODEL_PLUG_YS6602_UC = "YS6602-UC"
DEV_MODEL_PLUG_YS6602_EC = "YS6602-EC"
DEV_MODEL_PLUG_YS6614_UC = "YS6614-UC"
DEV_MODEL_PLUG_YS6614_EC = "YS6614-EC"
DEV_MODEL_PLUG_YS6803_UC = "YS6803-UC"
DEV_MODEL_PLUG_YS6803_EC = "YS6803-EC"
DEV_MODEL_SWITCH_YS5708_UC = "YS5708-UC"

View File

@ -58,6 +58,8 @@ from homeassistant.util import percentage
from .const import (
DEV_MODEL_PLUG_YS6602_EC,
DEV_MODEL_PLUG_YS6602_UC,
DEV_MODEL_PLUG_YS6614_EC,
DEV_MODEL_PLUG_YS6614_UC,
DEV_MODEL_PLUG_YS6803_EC,
DEV_MODEL_PLUG_YS6803_UC,
DEV_MODEL_TH_SENSOR_YS8004_EC,
@ -152,6 +154,8 @@ NONE_HUMIDITY_SENSOR_MODELS = [
POWER_SUPPORT_MODELS = [
DEV_MODEL_PLUG_YS6602_UC,
DEV_MODEL_PLUG_YS6602_EC,
DEV_MODEL_PLUG_YS6614_UC,
DEV_MODEL_PLUG_YS6614_EC,
DEV_MODEL_PLUG_YS6803_UC,
DEV_MODEL_PLUG_YS6803_EC,
]
@ -319,6 +323,15 @@ SENSOR_TYPES: tuple[YoLinkSensorEntityDescription, ...] = (
exists_fn=lambda device: device.device_type in [ATTR_DEVICE_SOIL_TH_SENSOR],
should_update_entity=lambda value: value is not None,
),
YoLinkSensorEntityDescription(
key="coreTemperature",
device_class=SensorDeviceClass.TEMPERATURE,
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
state_class=SensorStateClass.MEASUREMENT,
exists_fn=lambda device: device.device_model_name
in [DEV_MODEL_PLUG_YS6614_EC, DEV_MODEL_PLUG_YS6614_UC],
should_update_entity=lambda value: value is not None,
),
)