那我认为这就是您需要的:
cover: - platform: template covers: garage_door: device_class: garage friendly_name: "Garage Door" value_template: "{{ is_state_attr('switch.shelly_shsw_1_ba2c28', 'switch', 'true') }}" open_cover: service: switch.turn_on数据:entity_id:switch.shelly_shsw_1_ba2c28 close_cover:服务:switch.turn_on数据:entity_id:switch.shellelly_shsw_1_ba2c28
如果“按下按钮”在移动时停止门,您也可以添加:
stop_cover:服务:switch.turn_on数据:entity_id:switch.shelly_shsw_1_ba2c28