跳转到内容

模板按钮

template 按钮平台允许您仅通过动作创建简单的按钮。定义后,它将自动作为按钮出现在 Home Assistant 中,并可以通过前端界面进行控制。

# 示例配置项
button:
- platform: template
name: "Template Button"
on_press:
- logger.log: Button Pressed
  • 来自 Button 的所有选项。