I used GPT3 to fix my YAML code

I recetly created a bluprint that would not work because of bad indentation. This is (part) of the code where I could not find the error:

action:
  - choose:
    - conditions:
      - condition: template
        value_template: "{{trigger.id == 'alarm'}}"
      sequence:
      - service: input_select.select_option
        target: "{{buzzers}}"
        data:
          option: "alarm"
      - paralell:
        - sequence:
          - alias: "Setup notification variables"
            variables:
              action_stop: "{{ 'STOP_' ~ context.id }}"
          -  device_id: !input notify_device
             domain: mobile_app
             type: notify
             title: "{{ title | default('') }}"
             message: '{{message}} {{area_name(trigger_id)}}!'
             data:
               tag: "fire"
               sticky: true
               persistent: true
               actions:
               - action: "{{ action_stop }}" # The key you are sending for the event
                 title: "{{ button_label }}" # The button title
          - wait_for_trigger:
            - platform: event
              event_type: mobile_app_notification_action
              event_data:
                action: "{{ action_stop }}"
          - service: input_select.select_option
            target: "{{ buzzers }}"
            data:
              option: "mute" 
        - sequence:   ...

I looked and looked for the error but I could not find it. Do you see it?

Since I was playing around with chatGPT for the last couple of days, I went and posted my code and asked for help. It immeadiatly stated that my indentation was correct (I wasn’t crazy after all), but mentioned that I had a spelling mistake - that I wrote “paralell” instead of “parallel”. I’m pretty sure I would have spent even more hours before eventually giving up / posting my code to the forum and asking for help… As long as it is “free”, you should totally try and see if it can help you (spell correctly).

4 Likes