用脚本去发命令,然后模板动作设置成脚本。
给你个参考。
脚本:
tatami_lift_down:
alias: tatami lift down
sequence:
- service: remote.send_command
target:
entity_id: remote.rm_remote
data:
command: 你的射频码
mode: single
tatami_lift_up:
alias: tatami lift up
sequence:
- service: remote.send_command
target:
entity_id: remote.rm_remote
data:
command: 你的射频码
mode: single
tatami_lift_stop:
alias: tatami lift stop
sequence:
- service: remote.send_command
target:
entity_id: remote.rm_remote
data:
command: 你的射频码
mode: single
模板:
cover:
- platform: template
covers:
tatami_lift:
friendly_name: "升降机"
open_cover:
service: script.tatami_lift_up
close_cover:
service: script.tatami_lift_down
stop_cover:
service: script.tatami_lift_stop
position_template: 50
|