Fix action parsing

This commit is contained in:
QuantumEntangledAndy committed 2023-10-23 08:58:06 +07:00
1 parent a9540d0c26
commit 446387a3a0
5 files changed
+30 -2

No files matched your search

+1 -1
View File
@@ -18,6 +18,6 @@ pub struct Opt {
/// The name of the camera. Must be a name in the config
pub camera: String,
/// Whether to turn the PIR ON or OFF
#[arg(value_parser = onoff_parse, name = "on|off")]
#[arg(value_parser = onoff_parse, action = clap::ArgAction::Set, name = "on|off")]
pub on: Option<bool>,
}
+1 -1
View File
@@ -18,6 +18,6 @@ pub struct Opt {
/// The name of the camera to change the lights of. Must be a name in the config
pub camera: String,
/// Whether to turn the light on or off
#[arg(value_parser = onoff_parse, name = "on|off")]
#[arg(value_parser = onoff_parse, action = clap::ArgAction::Set, name = "on|off")]
pub on: bool,
}