The bool-file interface

bool-file allows access to a specific file with boolean semantics.

Auto-connect: no

ⓘ This is a snap interface. See Interface management and Supported interfaces for further details on how interfaces are used.

The above feels a bit sparse as documentation …

Here is an example for a slot definition with this interface granting access to an led (it also allows access to gpio sysfs nodes):

slots:
[...]
  led-green:
    interface: bool-file
    path: /sys/class/leds/green/brightness