name: Bug report
description: Report a bug with the integration or an existing device
labels: ["bug"]
body:
  - type: markdown
    attributes:
      value: |
        This form is for reporting bugs with the integration or existing devices. Bug reports should be detailed **with log messages or device diagnostics** to help developers determine what is going wrong.

        **If you are reporting a deprecation message from the log, please check that the message is for an HA deprecation (telling you to report the issue here), and that there is not already [a bug](https://github.com/make-all/tuya-local/issues?q=is%3Aissue+is%3Aopen+label%3Amaintenance) for the issue.** Most likely the deprecation is new in the latest HA release, and will not be "fixed" in the integration until late in the month or the next month, as fixes generally are not backwards compatible with older HA versions.  Other deprecation messages can be aimed at you, the end user, to prompt you to update automations etc. If the message is telling you an entity is deprecated, then you can disable the entity in Settings / Devices once you have adapted to use the replacement.

        If you have a question, or are unsure if what you observe is really a bug, consider using [Discussions](https://github.com/make-all/tuya-local/discussions) instead.

        If you are reporting an unsupported device, please use the **New Device** reporting template instead, which will guide you on the information required to make sure your request is not put into the "too hard" pile.

        If you are reporting a device which is listed as supported, but cannot be added, please include the WARNING log message that contains a dps list, which is output during the detection stage. If you are not getting such a message, please see discussion \#522 for hints on resolving connection issues.

        If you are intending to create a pull request, an issue is not required, but please clearly describe the reason for your PR in the description of the PR.

  - type: textarea
    id: description
    attributes:
      label: Description
      description: |
        A clear and concise description of the bug you are experiencing.
    validations:
      required: true
  - type: textarea
    id: steps
    attributes:
      label: Steps to reproduce
      description: |
        List any steps you need to take to reproduce this problem.
      placeholder: 1. Perform the ___ action...
    validations:
      required: false
  - type: textarea
    id: expected
    attributes:
      label: Expected behaviour
      description: |
        A clear and concise description of what you expected.
      placeholder: The device should...
    validations:
      required: false
  - type: textarea
    id: context
    attributes:
      label: Additional context
      description: |
        Please add additional context such as logs or device diagnostics here to help the developers understand what exactly is happening under the covers.
        Logs can be viewed under `Settings / System / Logs`
        Diagnostics can be downloaded from `Settings / Devices & Services / 1 device` under the relevant device.

        If applicable, you can also add screenshots to explain your problem.
    validations:
      required: false
  - type: checkboxes
    id: confirm
    attributes:
      label: Confirmation
      description: |
        Please select if the following are applicable
      options:
        - label: I am sure this is a bug or improvement, that is well enough described that it can be implemented.
          required: true
        - label: This report is for tuya-local, **not** for localtuya.
          required: true
        - label: |
            If this is for a specific device, the device config filename is mentioned above, or diagnostics are included.
          required: false
        - label: |
            Log messages or diagnostics relevant to the issue are included.
          required: false
        - label: This is not requesting addition of a new device.
          required: true
    validations:
      required: true
