id: '1628778076390'
alias: 自动制冷
description: ''
trigger:
- platform: time_pattern
minutes: /1
condition:
- condition: device
device_id: 7ccb134b61b0c5d427f0f7ac214eec67
domain: climate
entity_id: climate.mcn04_cloud_676829
type: is_hvac_mode
hvac_mode: fan_only
- condition: numeric_state
entity_id: sensor.t2_cloud_p4e800
attribute: temperatur_temperature
above: '27.8'
action:
- service: climate.set_temperature
target:
entity_id: climate.mcn04_cloud_676829
device_id: 7ccb134b61b0c5d427f0f7ac214eec67
data:
temperature: 25
hvac_mode: cool
- device_id: 7ccb134b61b0c5d427f0f7ac214eec67
domain: climate
entity_id: climate.mcn04_cloud_676829
type: set_hvac_mode
hvac_mode: cool
mode: single
上面的代码是webui配置出来的。触发条件是每分钟触发一次。附加条件1是空调处于fan_only模式,附加条件2是温湿度计温度高于27.8。
不成功。
后来我看了一下,发现附加条件1的判断就一直是false。
看起来好像是无法判断空调处于何种模式。
然后我在开发者工具里面的 状态 查看空调的状态如下。
hvac_modes:
- cool
- heat
- auto
- fan_only
- dry
- 'off'
min_temp: 7
max_temp: 35
target_temp_step: 1
fan_modes:
- Auto
- Low
- Medium
- High
swing_modes:
- 'Off'
- Vertical
current_temperature: 29.5
temperature: 28
fan_mode: Auto
swing_mode: 'Off'
model: lumi.acpartner.mcn04
firmware_version: 2.2.0
hardware_version: N/A for Cloud Mode
air_condit_switch_status: false
air_condit_mode: 0
air_condit_fault: No Faults
air_condit_target_temperature: 28
air_condit_speed: 0
air_condit_vertical_swing: false
power_cons_power_consumption: 0.049
power_cons_electric_power: 1
power_10A__power_consumption: null
power_10A__electric_power: 0
indicator__indicator_light: 1
indicator__effective_time: 589845
state_value: false
friendly_name: Mi Smart Air Conditioner Controller Pro
supported_features: 41
其中,空调处于送风的时候,air_condit_mode 是 “3” , 但是空调处于制冷或者处于关机状态,air_condit_mode 都是 “0”。
尝试用这个去判断空调是否处于送风模式,也失败,一直false。
|