Skip to content

Commit

Permalink
testing 7
Browse files Browse the repository at this point in the history
  • Loading branch information
asucrews authored Jul 3, 2024
1 parent 2392d12 commit 9329710
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -175,4 +175,4 @@ action:
entity_id: !input left_open_timer_helper

mode: single
max_exceeded: silent
max_exceeded: silent
7 changes: 7 additions & 0 deletions scripts/yaml_to_markdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
import sys
import os

# Define a constructor to handle the '!input' tag
def input_constructor(loader, node):
return node.value

# Add the constructor to the SafeLoader
yaml.SafeLoader.add_constructor('!input', input_constructor)

def yaml_to_markdown(yaml_file, markdown_file):
with open(yaml_file, 'r') as f:
data = yaml.safe_load(f)
Expand Down

0 comments on commit 9329710

Please sign in to comment.