Source code for pi_portal.commands.door_monitor

"""CLI command to start the Door Monitor."""

from pi_portal.modules.integrations import gpio
from .bases import command
from .mixins import state


[docs]class DoorMonitorCommand( command.CommandBase, state.CommandManagedStateMixin, ): """CLI command to start the Door Monitor."""
[docs] def invoke(self) -> None: """Invoke the command.""" factory = gpio.DoorMonitorFactory() door_monitor = factory.create() door_monitor.start()