How can i disable/hidden entity by yaml

It is easily to disable entity in Web UI.
But some integrations can only be edited through yaml,
and, the ''enable entity" option is not include in CONFIGURATION VARIABLES.
Is there any solution to solve it.

Comment it out by putting # in front of the configuration in .yaml

That will delete whole integrations.
A single integration may contain multiple entities, what i want is to disable one of them.

I have the same problem with MODBUS entities.
Any solution so far?