{"id":21310,"library":"esphome","title":"ESPHome","description":"ESPHome is a system for configuring microcontrollers via simple YAML files and controlling them remotely through home automation systems. Current version 2026.4.2, requires Python >=3.11, <3.15. Release cadence is monthly.","status":"active","version":"2026.4.2","language":"python","source_language":"en","source_url":"https://github.com/esphome/esphome","tags":["iot","microcontroller","home-assistant","automation","yaml"],"install":[{"cmd":"pip install esphome","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"note":"Use esphome.run_command() to invoke CLI programmatically; avoid subprocess calls.","symbol":"run_command","correct":"import esphome; esphome.run_command(['config', 'test.yaml'])"},{"note":"get_secret moved to esphome.secrets in recent versions.","wrong":"from esphome.core import get_secret","symbol":"secrets","correct":"from esphome.secrets import get_secret"}],"quickstart":{"code":"import esphome\nimport yaml\n\n# Basic configuration test\nconfig = {\n  'esphome': {\n    'name': 'test-device',\n    'platform': 'ESP32',\n    'board': 'nodemcu-32s'\n  },\n  'wifi': {\n    'ssid': 'MyWifi',\n    'password': 'mypassword'\n  }\n}\n# Validate configuration\nresult = esphome.run_command(['config', '--show-secrets', '-'], input=yaml.dump(config))\nprint(result)\n","lang":"python","description":"Validate an ESPHome configuration programmatically."},"warnings":[{"fix":"Use esphome run <config.yaml> or esphome compile <config.yaml> instead of relying on dashboard.","message":"ESPHome requires a running dashboard or manual compilation. Running pipelines without the dashboard may require special flags.","severity":"gotcha","affected_versions":"all"},{"fix":"Update your config parsing to handle new JSON schema or use esphome.run_command('config') to get correct output.","message":"Breaking change: In 2026.x, the JSON config format changed. Old flasher scripts may break.","severity":"breaking","affected_versions":">=2026.0"},{"fix":"Switch to esp-idf platform in your config or set legacy flag: esphome: { framework: { name: 'arduino', version: 'recommended' } }","message":"PlatformIO build system is deprecated in favor of ESP-IDF for ESP32. Using Arduino framework may cause compatibility warnings.","severity":"deprecated","affected_versions":">=2024.12"},{"fix":"Set SECRETS_PATH environment variable or copy secrets.yaml to working directory.","message":"Secrets are read from a 'secrets.yaml' file in the config directory. Programmatic usage may need to specify the path.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Run pip install esphome","cause":"ESPHome is not installed.","error":"ModuleNotFoundError: No module named 'esphome'"},{"fix":"Upgrade esphome: pip install --upgrade esphome","cause":"Older CLI version does not support --show-secrets","error":"esphome: error: unrecognized arguments: --show-secrets"},{"fix":"Use Python 3.11 or 3.12 (or 3.14 if available)","cause":"Python version out of range; ESPHome 2026.4.2 requires Python >=3.11, <3.15","error":"ERROR: Could not find a version that satisfies the requirement esphome (from versions: none)"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}