"""Base class for typed device instructions on the send pipeline."""

from dataclasses import dataclass, field


@dataclass
class Instruction:
    """Base class for all typed device instructions.

    Subclasses declare a class-level ``action`` (ClassVar[Instructable]) matching an
    ``Instructable`` constant, plus typed fields for every parameter the instruction requires.
    The corresponding EEP encoder receives the Instruction instance directly and translates
    its typed fields into raw EEP field values.
    """

    entity_id: str = field(default="", kw_only=True)
    """Target entity ID. Encoders use this to determine the target channel or sub-unit."""
