All subcommands accept the global flags (Documentation Index
Fetch the complete documentation index at: https://mintlify.com/richard87/esphome-apiclient/llms.txt
Use this file to discover all available pages before exploring further.
--yaml, --address, --key, --name, --timeout) in addition to any command-specific flags listed below.
scan
scan
Scan for ESPHome devices on the local network using mDNS. No connection is established — the scan sends an mDNS query for the Flags
ExampleOutput
_esphomelib._tcp.local. service and collects responses for the duration of the timeout.Usage| Flag | Default | Description |
|---|---|---|
--timeout / -t | 5s | How long to listen for mDNS responses. |
info
info
Connect to a device and print its identity information: name, MAC address, ESPHome version, model, project name and version, compilation timestamp, and negotiated API version.UsageExample output
entities
entities
Connect to a device and print all entities grouped by domain. Each entity shows its hex key, name, object ID, and (for sensors) unit of measurement. Also displays ESPHome services with their argument signatures.UsageExample output
sensors
sensors
Connect to a device, discover entities, then stream live state updates. Prints a formatted line each time a sensor, binary sensor, switch, or text sensor value changes. Press Example output
Ctrl+C to stop.Usagelogs
logs
Connect to a device and stream log output. Each line is prefixed with the log level. The Flags
ExamplesExample output
--level flag sets the minimum level to receive — the device filters and sends only messages at or above that level.Usage| Flag | Default | Description |
|---|---|---|
--level | DEBUG | Minimum log level to receive. Accepted values: NONE, ERROR, WARN, INFO, CONFIG, DEBUG, VERBOSE, VERY_VERBOSE. |
switch
switch
Connect to a device and either list all available switches (when Flags
ExamplesList output
--switch-key is omitted) or set a specific switch to on or off.Usage| Flag | Description |
|---|---|
--switch-key | Hex key of the switch entity (e.g. 0xABCD1234). Omit to list available switches. |
--switch-state | Target state: on, off, true, false, 1, or 0. Required when --switch-key is provided. |
bluetooth
bluetooth
Connect to a device that has the Bluetooth proxy component enabled, then stream Bluetooth LE advertisement packets. Handles both the legacy Example output
BluetoothLEAdvertisementResponse and the newer BluetoothLERawAdvertisementsResponse formats. Press Ctrl+C to stop.UsageThis command requires a device with the ESPHome Bluetooth proxy component configured. See Bluetooth proxy for the corresponding API methods.