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 30
  • Win 11
  • Mac 13
  • Linux 6
Aug 6 Aug 5 Aug 4 Aug 3 Aug 2 Aug 1 Jul 31 Jul 30 Jul 29 Jul 28 Jul 27 Jul 26 Jul 25 Jul 24 Jul 23 Jul 22 Jul 21 Jul 20 Jul 19 Jul 18 Jul 17 Jul 16 Jul 15 Jul 14 Jul 13 Jul 12 Jul 11 Jul 10 Jul 9 Jul 8 Jul 7 Jul 6 Jul 5 Jul 4 Jul 3 Jul 2 Jul 1 Jun 30 Jun 29 Jun 28 Jun 27 Jun 26 Jun 25 Jun 24 Jun 23
Windows 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 0 0 0
Mac 0 0 0 0 0 1 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 1 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 1 0 0 0 3 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.