sreejith2904

scripts.yaml

Sep 2nd, 2024 (edited)
616
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 1.01 KB | None | 0 0
  1. run_recipes_script:
  2.   alias: "Run Recipe Script"
  3.   sequence:
  4.     - service: command_line
  5.       data:
  6.         command: "python3 /config/python_scripts/get_recipes.py {{ states('input_text.recipe_tag') }}"
  7.  
  8. update_bookmark_sensor:
  9.     alias: "Update Recipe Sensor"
  10.     sequence:
  11.       - service: homeassistant.update_entity
  12.         target:
  13.           entity_id: sensor.recipe_sensor_2
  14.  
  15. send_recipe_notification:
  16.   alias: "Send Recipe Notification"
  17.   sequence:
  18.     - service: notify.sreejith
  19.       data:
  20.         message: >
  21.          {% set file_path = '/config/www/recipe_script_output.json' %}
  22.           {% set content = (states('sensor.recipe_script_output') or 'No content') %}
  23.           {{ content }}
  24.  
  25. turn_on_recipe_switch:
  26.   alias: "Turn On Recipe Switch"
  27.   sequence:
  28.     - service: input_boolean.turn_on
  29.       entity_id: input_boolean.recipe_switch
  30.  
  31. turn_off_recipe_switch:
  32.   alias: "Turn Off Recipe Switch"
  33.   sequence:
  34.     - service: input_boolean.turn_off
  35.       entity_id: input_boolean.recipe_switch
Advertisement
Add Comment
Please, Sign In to add comment