name: 🐛 Bug Report
description: File a bug report
labels: ["bug"]
body:
  - type: markdown
    attributes:
      value: |
        ### ⚠️ Please remember: issues are for *bugs*⚠️
        That is, something you believe affects every single user of OpenDTU, not just you. If you're not sure, start with one of the other options below.
  - type: markdown
    attributes:
      value: |
        #### Have a question? 👉 [Start a new discussion](https://github.com/tbnobody/OpenDTU/discussions/new) or [ask in chat](https://discord.gg/WzhxEY62mB).

        #### Before opening an issue, please double check:

        - [Documentation](https://www.opendtu.solar).
        - [The FAQs](https://www.opendtu.solar/firmware/faq/).
        - [Existing issues and discussions](https://github.com/tbnobody/OpenDTU/search?q=&type=issues).
  - type: textarea
    id: what-happened
    attributes:
      label: What happened?
      description: A clear and concise description of what the bug is.
      placeholder: Tell us what the problem is.
    validations:
      required: true
  - type: textarea
    id: how-to-reproduce
    attributes:
      label: To Reproduce Bug
      description: Steps to reproduce the behavior, if consistently possible.
      placeholder: Tell us how to make the bug appear.
    validations:
      required: true
  - type: textarea
    id: expected-behavior
    attributes:
      label: Expected Behavior
      description: A clear and concise description of what you expected to happen.
      placeholder: Tell us what you expected to happen.
    validations:
      required: true
  - type: dropdown
    id: install_format
    attributes:
      label: Install Method
      description: How did you install OpenDTU?
      options:
        - Pre-Compiled binary from GitHub releases
        - Pre-Compiled binary from GitHub actions/pull-request
        - Self-Compiled
    validations:
      required: true
  - type: input
    id: version
    attributes:
      label: What git-hash/version of OpenDTU?
      description: You can find this in the Web UI at Info -> System.
      placeholder: "e.g. 359d513"
    validations:
      required: true
  - type: input
    id: environment
    attributes:
      label: What firmware variant (PIO Environment)?
      description: You can find this in the Web UI at Info -> System.
      placeholder: "generic_esp32s3_usb"
    validations:
      required: true
  - type: textarea
    id: logs
    attributes:
      label: Relevant log/trace output
      description: Please copy and paste any relevant log output if you have it. This will be automatically formatted into code, so no need for backticks.
      render: Shell
  - type: textarea
    attributes:
      label: Anything else?
      description: |
        Links? References? Anything that will give us more context about the issue you are encountering!
        Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
    validations:
      required: false
  - type: checkboxes
    id: required-checks
    attributes:
      label: Please confirm the following
      options:
        - label: I believe this issue is a bug that affects all users of OpenDTU, not something specific to my installation.
          required: true
        - label: I have already searched for relevant existing issues and discussions before opening this report.
          required: true
        - label: I have updated the title field above with a concise description.
          required: true
        - label: I have double checked that my inverter does not contain a W in the model name (like HMS-xxxW) as they are not supported.
          required: true
