ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

LSP-esphome

by sublimelsp ST4

Validation, completion and hover help for ESPHome Yaml files.

Labels lsp, esphome

Details

Installs

  • Total 33
  • Win 12
  • Mac 14
  • Linux 7
Sep 16 Sep 15 Sep 14 Sep 13 Sep 12 Sep 11 Sep 10 Sep 9 Sep 8 Sep 7 Sep 6 Sep 5 Sep 4 Sep 3 Sep 2 Sep 1 Aug 31 Aug 30 Aug 29 Aug 28 Aug 27 Aug 26 Aug 25 Aug 24 Aug 23 Aug 22 Aug 21 Aug 20 Aug 19 Aug 18 Aug 17 Aug 16 Aug 15 Aug 14 Aug 13 Aug 12 Aug 11 Aug 10 Aug 9 Aug 8 Aug 7 Aug 6 Aug 5 Aug 4 Aug 3
Windows 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Mac 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Linux 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

LSP-esphome

Uses esphome-lang-server from esphome-vscode to provide validation, completion and hover help for ESPHome Yaml configuration files.

Installation

  • Install ESPHome syntax
  • Install LSP and LSP-esphome from Package Control.
  • Restart Sublime.

Usage

[!WARNING]

For the server to start the file needs to use the YAML (esphome) syntax. Set it from the Command Palette or from the syntax selector in the status bar.

Since ESPHome configuration files use the .yml/.yaml extension and do not differ much from standard YAML files, there is no easy way to automatically assign it to all ESPHome configuration files (unless you want to use this syntax for all YAML files, which could introduce its own problems). Therefore, it is recommended to use the ApplySyntax or AutoSetSyntax package to assign this syntax based on the file path - most likely on a per-project basis since there is nothing inherently unique about the file names or paths of these configuration files.

Configuration

Open configuration file using Command Palette with Preferences: LSP-esphome Settings command or opening it from the Sublime menu (Preferences > Package Settings > LSP > Servers > LSP-esphome).

The plugin validates against ESPHome itself, so you will get the same errors. You can connect to ESPHome in two different ways:

  1. Use the ESPHome Device Builder, this can be the ESPHome running in Home Assistant, in that case you will need to configure the add-on to leave_front_door_open and also give a TCP port in the addon for external access (in case you are only accessing via Ingress).

  2. Use a local installation of ESPHome. By default uses Python environment managed by this package. If you can run esphome in your terminal or have installed esphome in a virtual environment, then you can override pythonPath in initialization_options to point at it. In that case it needs point at python executable inside your venv folder or, if Python is in the PATH, the executable name.

Completion and hover help needs to pull schema from https://schema.esphome.io. The schemas are versioned so the extension will first connect to you Device Builder or local ESPHome to retrieve the version you are using and then try to pull the best available matching version. For the dev version it will pull the schemas dev version daily.