hassio-addons / addon-vscode

Studio Code Server - Home Assistant Community Add-ons
https://addons.community
MIT License
495 stars 80 forks source link

configuration.yaml could not be parsed and marked red without reason #550

Closed dzikus closed 1 year ago

dzikus commented 1 year ago

Problem/Motivation

(Why the issue was filed)

Highlights errors that are not there, configuration is working and could not be parsed only by VSCode.

image image

Expected behavior

(What you expected to happen)

to parse correctly configuration like:

        connections:
          - - 'mac'
            - 'aa:bb:cc:dd:ee:ff'

Actual behavior

(What actually happened)

image

Steps to reproduce

(How can someone else make/see it happen)

put to your configuration.yaml these example:

mqtt:
  sensor:
    - name: "Shelly 3EM Meter Current 0"
      state_topic: "shellies/shellyem3/emeter/0/current"
      unit_of_measurement: "A"
      payload_available: "true"
      payload_not_available: "false"
      availability_topic: "shellies/shellyem3/online"
      availability_mode: latest
      value_template: "{{(value|float)|round(1)}}"
      unique_id: "shellyem3-emeter-current-0"
      qos: 0
      state_class: "measurement"
      device_class: "current"
      force_update: false
      device:
        name: "Shelly 3EM"
        model: "Shelly 3EM"
        manufacturer: "Allterco Robotics"
        sw_version: "20220830-080542/v1.12-3EM-gcf4f7c2"
        connections:
          - - 'mac'
            - 'aa:bb:cc:dd:ee:ff'
    - name: "Shelly 3EM Meter Power 0"
      state_topic: "shellies/shellyem3/emeter/0/power"
      unit_of_measurement: "W"
      payload_available: "true"
      payload_not_available: "false"
      availability_topic: "shellies/shellyem3/online"
      availability_mode: latest
      value_template: "{{((value|float)*(-1))|round(0)}}"
      unique_id: "shellyem3-emeter-power-0"
      qos: 0
      state_class: "measurement"
      device_class: "power"
      force_update: false
      device:
        name: "Shelly 3EM"
        model: "Shelly 3EM"
        manufacturer: "Allterco Robotics"
        sw_version: "20220830-080542/v1.12-3EM-gcf4f7c2"
        connections:
          - - 'mac'
            - 'aa:bb:cc:dd:ee:ff'

Proposed changes

(If you have a proposed change, workaround or fix, describe the rationale behind it)

frenck commented 1 year ago

This is not an add-on issue, but an issue with the Home Assistant configuration helper extension for VSCode. Please report this issue in their issue tracker instead.

Thanks 👍

../Frenck