Entity Controller (EC) is an implementation of "When This, Then That" using a finite state machine that ensures basic automations do not interfere with the rest of your home automation setup. This component encapsulates common automation scenarios into a neat package that can be configured easily and reused throughout your home. Traditional automations would need to be duplicated for each instance in your config. The use cases for this component are endless because you can use any entity as input and outputs (there is no restriction to motion sensors and lights).
The controller needs sensors to monitor (such as motion detectors, binary switches, doors, weather, etc) as well as an entity to control (such as a light).
entity_controller:
motion_light: # serves as a name
sensor: binary_sensor.living_room_motion # required, [sensors]
entity: light.table_lamp # required, [entity,entities]
delay: 300 # optional, overwrites default delay of 180s