本帖最后由 打酱油 于 2021-3-11 22:25 编辑
热水器前端家里一个电量插座来判断热水器开关状态。
想做个自动化实现煮水后待机状态关闭热水器,开启状态2000W,关机状态2-3,待机状态3-4,由于待机跟关机状态有1w幅度导致无法准确判断来实现脚本!
请大神给个思路,本想在热水器内部加个功耗让热水器待机跟关机状态加大功率区分开了
目前自动化,但是由于待机跟关机状态有1w幅度经常失效!
alias: 热水器待机自动关机
description: ''
trigger:
- entity_id: switch.bedroomheater
platform: state
from: 'on'
to: 'off'
for: '10'
condition:
- above: '3'
below: '5'
condition: numeric_state
entity_id: sensor.xiaomi_plug_power
action:
- data:
command:
- >-
b64:JgBcAAABJJMTERQ3ExEUNhQ2FBEUERMSEzcTERQITNxMRFBEUNhQ2FDYUERQ2EzcTNxM3FBETNxMSExEUERQRFDYTEhM3ExITNxM3EzcTNxMRFDcUAA0FAAAAAAAA
entity_id: remote.wei_sheng_jian_yao_kong_remote
service: remote.send_command
- delay:
hours: 0
minutes: 0
seconds: 25
milliseconds: 0
- data: {}
service: script.close_bedroom_heater
mode: single
|