Entity Controller (EC) is a finite-state-machine automation helper for Home Assistant.
Think of it as: "when sensor(s) are active, turn target entity/entities on, then handle timers, overrides, constraints, and state transitions safely."
It helps avoid duplicated automation logic and gives you a reusable automation controller entity.
Entity Controller Documentation
- Install Entity Controller from HACS.
- Restart Home Assistant.
- Go to Settings -> Devices & Services -> Add Integration.
- Search for Entity Controller.
The config flow has 2 steps.
Set at least:
namedelaysensors(one or more sensor entities)entities(one or more controlled entities)
You can also pick devices via sensor_devices / control_devices; their entities are merged automatically.
Optional settings include:
service_data,service_data_offnight_mode- transition
behaviours - state interpretation lists (
*_states_*,state_strings_*) - backoff options (
backoff,backoff_factor,backoff_max) - debug/diagram options (
draw,image_prefix,image_path,day_length)
YAML is still supported for compatibility and migration.
Example:
entity_controller:
motion_light:
sensor: binary_sensor.living_room_motion
entity: light.tv_led
delay: 5When YAML config is detected, it is imported into config entries.
Notes:
- UI flow uses plural keys:
sensors,entities - legacy singular keys:
sensor,entityare still accepted and merged
Use the integration Configure option (options flow) to edit an existing controller from the UI.
- If field labels appear as raw keys (
sensors,entities, etc.), do a full Home Assistant restart and hard-refresh the browser. - For debugging, enable debug logs for
custom_components.entity_controller.
I created the following video to give a high-level overview of EC features and common setup patterns.
Maintaining and improving this integration takes time. If it helps your setup, consider donating or helping triage/fix issues.
All contributions are welcome, including issues and pull requests.
Please include complete reproduction details when reporting bugs.