Skip to content
Home Assistant TestFlight
DIY & makers

Command line

command_line

Built inLocal polling

The Command line integration offers functionality that issues specific commands to get data or to control a device.

In Apple Home through HomeKit Bridge

What HomeKit Bridge makes of each kind of entity this integration creates, read from its source code. A device only gets the ones that apply to it.

EntityShows up asNote
switchSwitch or outlet
coverBlind, garage door, window or door
binary_sensorSensor (motion, contact, leak, smoke…)
sensorSensor (temperature, humidity, air quality…)

2 reports below say how a device from this integration behaves in the Home app.

What people report

  • Works1
  • Partly works1
DeviceIn Home AssistantIn Apple HomeWhat they saidSource
Command-line light sensorWorksWorks in Home
Light level 0 failed to update; fixed in 2022.2
Zero lux values were skipped by HomeKit; fixed in 2022.2
Saved copy
The problem I have the sensor created via `Command-line sensor` integration, which reads the value from a self-hosted web server; on the Home Assistant overview I see the correct value when the sensor is 0 but HomeKit integration doesn't call the update value function. [code] It seems that it doesn't enter the `if` statement in the code above. ### What version of Home Assistant Core has the issue? core-2021.12.4 ### What was the last working version of Home Assistant Core? _No response_ ### What type of installation are you running? Home Assistant Container ### Integration causing the issue …

Excerpt saved from GitHub on 2026-10-23.

Issue #62641 · 2021-12
Command line garage coverPartly worksPartly in Home
Door stays Opening forever without assumed state
Cover reports integer state; HomeKit shows Opening indefinitely
Saved copy
With #13796 I'm using `command_line` cover type, which only supports a `command_state` that returns an integer (designed for window shade position). But since `garage` device type has a `assume_state` attribute, we could use it in homekit to send `open` when touched and then assume the door is closed right away and return that status to HomeKit. Without that, the door stays in *Opening* state forever. Another solution would be to add an actual `command_doorstate` option to `command_line` that could return `opened` or `closed` instead of an integer. Ideally current `command_state` should be …

Excerpt saved from GitHub on 2026-10-23.

Issue #13857 · 2018-04

Gathered from GitHub issues, pull requests, discussions and docs, and from r/homeassistant. These are individual reports, so check the linked thread and the date before you buy.

How it connects

Local polling

Talks to the device on your network, asking it for updates every so often.

Details

Installs (analytics)30,331 (4.28%)
Quality scaleLegacy
Added inHome Assistant 0.12
Set up in the UINo, YAML
Maintainers@gjohansson-ST

In ReReHome

Whatever HomeKit Bridge shares reaches Apple Home as normal HomeKit accessories behind your Home Assistant bridge, so ReReHome shows and controls them like any other.

Bridges get their own settings page listing the accessories behind them.