aboutsummaryrefslogtreecommitdiffstats
path: root/fritz
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2016-03-29 13:06:33 +0200
committerGerd Hoffmann <kraxel@redhat.com>2016-03-29 13:06:33 +0200
commit51dbd77cb7303c14d10706fc2217722b1447b5b6 (patch)
treeb6b43755f682e311ab74dc84639aaedc445aa73c /fritz
parent008c109018a75945408f3598dcce742f0c8d363a (diff)
downloadhue-51dbd77cb7303c14d10706fc2217722b1447b5b6.tar.gz
fritz tweaks
Diffstat (limited to 'fritz')
-rwxr-xr-xfritz13
1 files changed, 9 insertions, 4 deletions
diff --git a/fritz b/fritz
index c0fd7fb..88c5d36 100755
--- a/fritz
+++ b/fritz
@@ -143,17 +143,22 @@ login();
get_devlist();
# print device list
-if (!defined($mode) || $mode eq "devlist") {
+if (!defined($mode) || $mode eq "devlist" || $mode eq "list") {
print_devlist();
exit;
}
-if ($mode eq "rawlist") {
- print Dumper($devlist);
+if ($mode eq "rawlist" || $mode eq "raw") {
+ my $dev = shift;
+ if (defined($dev) && defined($devlist->{'device'}->{$dev})) {
+ print Dumper($devlist->{'device'}->{$dev});
+ } else {
+ print Dumper($devlist);
+ }
exit;
}
# operate switch
-if ($mode eq "switch") {
+if ($mode eq "switch" || $mode eq "sw") {
my $switch = shift;
my $state = shift;
die "missing switch args"