Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use yaml to parse action params #447

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

al-one
Copy link

@al-one al-one commented Dec 25, 2024

使用 yaml 来解析 action 参数,以获得更多的兼容性。

  • 完全兼容之前的 json 格式参数,用户无迁移成本
    • [str1, 'str2', 123, true, 'on', 'yes']
    • on/off/yes/no等词会被解析成 bool,需要引号包裹
  • action 仅有一个参数时,支持直接传递字符串,无需传递'["xxx"]'
    action: notify.send_message
    data:
      entity_id: notify.xiaomi_cn_xxxx
      message: 我是小爱

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants