- 积分
- 535
- 金钱
- 446
- 威望
- 0
- 贡献
- 0
- HASS币
- 0
高级会员

- 积分
- 535
- 金钱
- 446
- HASS币
- 0
|
发表于 2025-2-24 10:47:57
|
显示全部楼层
#################################浴霸####################################
{
"lumi.bhf_light.acn001": ["Aqara", "Smart Yuba T1", "ZNYB01LM"],
"params": [
# Light实体(照明功能)
{
"light": {
MK_INIT_PARAMS: {
MK_HASS_NAME: "light",
"supported_features": LightEntityFeature.EFFECT,
"supported_color_modes": {ColorMode.BRIGHTNESS, ColorMode.COLOR_TEMP},
"color_mode": ColorMode.COLOR_TEMP,
"min_color_temp_kelvin": 2700,
"max_color_temp_kelvin": 6500
},
MK_RESOURCES: {
"toggle": ("4.1.85", "_attr_is_on"),
"brightness": ("1.7.85", "_attr_brightness"),
"color_temp_kelvin": ("1.9.85", "_attr_color_temp_kelvin")
}
}
},
# 电源开关
{
"switch": {
MK_INIT_PARAMS: {
MK_HASS_NAME: "power",
"entity_name": "Power Switch"
},
MK_RESOURCES: {
"toggle": ("4.21.85", "_attr_is_on")
}
}
},
# 温度传感器
{
"sensor": {
MK_INIT_PARAMS: {
MK_HASS_NAME: "current_temperature",
"device_class": SensorDeviceClass.TEMPERATURE,
"state_class": SensorStateClass.MEASUREMENT,
"unit_of_measurement": UnitOfTemperature.CELSIUS
},
MK_RESOURCES: {
"temperature": ("0.1.85", "_attr_native_value")
}
}
},
# 目标温度传感器
{
"sensor": {
MK_INIT_PARAMS: {
MK_HASS_NAME: "target_temperature",
"device_class": SensorDeviceClass.TEMPERATURE,
"state_class": SensorStateClass.MEASUREMENT,
"unit_of_measurement": UnitOfTemperature.CELSIUS
},
MK_RESOURCES: {
"temperature": ("1.8.85", "_attr_native_value")
}
}
},
# Climate实体(浴霸主控)
{
"climate": {
MK_INIT_PARAMS: {
MK_HASS_NAME: "yuba",
"supported_features": ClimateEntityFeature.TARGET_TEMPERATURE
| ClimateEntityFeature.FAN_MODE
| ClimateEntityFeature.SWING_MODE
| ClimateEntityFeature.PRESET_MODE,
"hvac_modes": [HVACMode.HEAT, HVACMode.DRY, HVACMode.FAN_ONLY, HVACMode.OFF],
"fan_modes": [FAN_LOW, FAN_MEDIUM, FAN_HIGH, FAN_AUTO],
"swing_modes": [SWING_ON, SWING_OFF],
"preset_modes": ["Normal", "Boost"],
"min_temp": 20,
"max_temp": 40,
"temperature_unit": UnitOfTemperature.CELSIUS
},
MK_RESOURCES: {
"current_temperature": ("0.1.85", "_attr_current_temperature"),
"target_temperature": ("1.8.85", "_attr_target_temperature"),
"fan_mode": ("14.35.85", "_attr_fan_mode"),
"swing_mode": ("14.47.85", "_attr_swing_mode"),
"preset_mode": ("14.51.85", "_attr_preset_mode"),
"hvac_mode": ("14.51.85", "_attr_hvac_mode")
}
}
}
]
},###尝试自己添加了以上浴霸的代码后好像还是识别不到 请求楼主帮忙看看 这样对吗 |
|