- id: '1600139371554'
alias: 电车充电
description: ''
trigger:
- entity_id: switch.dian_che_chong_dian
for: '120'
from: 'off'
platform: state
to: 'on'
- above: '1'
below: '500'
entity_id: sensor.switch1_current_consumption
for: '150'
platform: numeric_state
condition:
- above: '0'
below: '8'
condition: numeric_state
entity_id: sensor.switch1_current_consumption
action:
- data: {}
entity_id: switch.dian_che_chong_dian
service: switch.turn_off
mode: single
搞了一个插座低于8W就自动关闭设备。目前测试有问题,当打开开关后功率正好在8W以内是正常触发关闭,如果打开设备后功率大于8W,当设备回到8W内后不会自动关闭设备!代码有问题?
|