keesschollaart81 / vscode-home-assistant

Visual Studio Code Extension for Home Assistant. ⭐ if you think this is cool!
MIT License
555 stars 119 forks source link

YAML error with WebOS automation #2137

Open kmplngj opened 2 years ago

kmplngj commented 2 years ago

I get two yaml error messages in my automation but I think the automation is correct. It is the example from the HA documentation and it is working. I had a look at the schemas but I don't get how I could add this correctly.

[{
    "resource": "/Volumes/config/automations.yaml",
    "owner": "_generated_diagnostic_collection_name_#0",
    "code": "1",
    "severity": 8,
    "message": "Value is not accepted. Valid values: \"calendar\".",
    "source": "yaml-schema: http://schemas.home-assistant.io/integration-automation",
    "startLineNumber": 3035,
    "startColumn": 15,
    "endLineNumber": 3035,
    "endColumn": 30
},{
    "resource": "/Volumes/config/automations.yaml",
    "owner": "_generated_diagnostic_collection_name_#0",
    "severity": 8,
    "message": "String does not match the pattern of \"^calendar\\.(?!_)[\\da-z_]+(?<!_)$\".",
    "source": "yaml-schema: http://schemas.home-assistant.io/integration-automation",
    "startLineNumber": 3036,
    "startColumn": 16,
    "endLineNumber": 3036,
    "endColumn": 34
}]
- id: '1643879699292'
  alias: Turn on LG TV via Wake on Lan
  description: ''
  trigger:
  - platform: webostv.turn_on
    entity_id: media_player.lg_tv
  action:
  - service: wake_on_lan.send_magic_packet
    data:
      mac: FF-FF-FF-FF-FF-FF
  mode: single

Thanks for the help Jan

frenck commented 2 years ago

Hmm right, the extension doesn't take custom triggers into account yet.

Thanks for reporting 👍

cameronkelley commented 1 month ago

@frenck Any chance https://github.com/keesschollaart81/vscode-home-assistant/pull/2292 could be merged to resolve this issue?