changed heat to climate

This commit is contained in:
mischa 2020-06-25 19:16:35 +02:00
parent ff92d10998
commit 53808b4295
1 changed files with 5 additions and 5 deletions

View File

@ -20,7 +20,7 @@ GetOptions(
"id=i" => \(my $RESOURCE_ID),
"sensor=i" => \(my $SENSOR_ID),
"battery=i" => \(my $BATTERY),
"heat" => \(my $HEAT),
"climate" => \(my $CLIMATE),
"action=s" => \(my $ACTION = "state"),
"verbose" => \(my $VERBOSE),
"debug" => \(my $DEBUG),
@ -35,8 +35,8 @@ bridge-name as defined in [HOME]./hue.conf or [HOME]./.hue.conf or /etc/hue.c
-i | --id light-id
-s | --sensor sensor-id
-b | --battery percent of battery level to report on, only relevant with sensors
-c | --climate show temperature of sensors in C, only relevant with sensors
-a | --action [ on | off | state | bright | relax | morning | dimmed | evening | nightlight ] (default: state)
-h | --heat show temperature of sensors in C, only relevant with sensors
-v | --verbose
-d | --debug JSON output
-p | --pretty pretty JSON output (can be a lot)
@ -69,7 +69,7 @@ if (!$bridgename) { _return_error_with($USAGE); }
my @config_files = map { -e $_ ? $_ : () } ('./hue.conf', './.hue.conf', '/etc/hue.conf', "$ENV{'HOME'}/.hue.conf", "$ENV{'HOME'}/hue.conf");
my $config = Config::Tiny->read($config_files[-1], 'utf8');
my $bridge = $config->{$bridgename}{ip} || _return_error_with("Error: bridge-name '$bridgename' not found.\n\n$USAGE");
my $bridge = $config->{$bridgename}{ip} || _return_error_with("$USAGE\nError: bridge-name '$bridgename' not found.\n");
my $token = $config->{$bridgename}{token};
my $http = HTTP::Tiny->new;
my $json = JSON::PP->new;
@ -209,7 +209,7 @@ sub sensors {
}
}
if (! $BATTERY && ! $HEAT) {
if (! $BATTERY && ! $CLIMATE) {
printf "%4s %-34s %-8s %s (%s)\n", "ID", "Name", "State", "Type", $TYPE;
print "################################################################################\n";
}
@ -222,7 +222,7 @@ sub sensors {
}
}
}
elsif ($HEAT) {
elsif ($CLIMATE) {
if ($sensor_objects->{$key}->{'type'} =~ /ZLLPresence/) {
$name = $sensor_objects->{$key}->{'name'};
}