Skip to content

PQ0001 — Command handler not found

A device type declares a command in commands: and no handler for it exists in the adapter code.

The YAML says the device type accepts the command. Nothing in the code carries it out.

- type_id: Door
  commands:
    - pq.command.access.lock     # no Handle(Access.Lock ...) anywhere in the adapter

Why the build warns

The model promises something the adapter cannot do. The adapter has no code that carries the command out.

How to fix it

Write the handler. Add a method that takes the command type first and a CancellationToken last, and returns Task or ValueTask:

public Task Handle(Access.Lock cmd, CancellationToken ct) { ... }

Any visibility works, static or instance. See command handling.

Or remove the command from commands: if the device does not support it.

If you disagree with a report

Do not suppress it. A wrong report is a bug in the check — report it with the YAML and handler that triggered it.