#vscode-addon: template switch: shows "property switch is not allowed"

1 messages · Page 1 of 1 (latest)

rain flax
#

I moved my legacy templates to the new format, and according to the documentation, this is correctly, also the configuration check by home assistant seems fine. but vscode throws this error. is this a bug?

  - switch:  #<- error shows there
      - name: "switch name"
        ...      
  - sensor: #<- this is fine
      - name: "sensor name name"
        ...  
fleet rune
#

Are you running current version of Home Assistant?

fleet rune
#

Where is that template: key located in your code?

#

configuration.yaml?

rain flax
fleet rune
#

Then I don't know what the issue is.
I assume you are referencing The Docs for the command. Look them over again, compare your code to the examples.

#

There can be only one template: key in that file including any includes.

rain flax
#

for testing purpose, i just deleted my whole template: and copied the one from the docs. It still shows. I think it's a bug.

fleet rune
#

There is no bug

dawn zenith
#

The issue is probably that the VSCode extension shipped with the addon is old

#

You can ignore it

rain flax
#

It's just a warning, but I thought when I clean up, I want them gone, and if it's a bug, it would confuse other ppl less.

dawn zenith
#

Mine doesn't have this issue

fleet rune
#

Could be that.

dawn zenith
#

This came up in the last few days

fleet rune
#

Well you can add an issue to the vscode extension to get it fixed.

rain flax
#

Alright, just wanted to confirm that it's not just me doing wrong 🙂

fleet rune
thorny marlin
#

It's already fixed, you'll just have to wait for the add-on to be updated

fleet rune
#

And add there what you posted here, assuming someone didn't already do it.

#

Cool

rain flax
#

then all good. thanks everyone 😃

dawn zenith
#

I'm using the latest and greatest, but the VSCode addon has some version pre installed and doesn't update