Skip to content

Commit

Permalink
Merge branch 'venstar_colortouch'
Browse files Browse the repository at this point in the history
  • Loading branch information
hplato committed Jul 16, 2020
2 parents 65e7bc8 + 73cf7d9 commit f9909a3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/Venstar_Colortouch.pm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package Venstar_Colortouch;

# v2.1.2
# v2.1.3

#added in https support and don't retry commands that have a valid error reason code. Only retry if the device doesn't respond. (ie error 500)

Expand Down Expand Up @@ -176,7 +176,7 @@ sub _init {
$self->{active} = 1;
$self->{previous}->{tempunits} = $self->{data}->{tempunits};
$self->{previous}->{name} = $self->{data}->{name};
foreach my $key1 ( keys $self->{data}->{info} ) {
foreach my $key1 (keys %{$self->{data}->{info}} ) {
$self->{previous}->{info}->{$key1} = $self->{data}->{info}->{$key1};
}
$self->{previous}->{sensors}->{sensors}[0]->{temp} = $self->{data}->{sensors}->{sensors}[0]->{temp};
Expand Down Expand Up @@ -288,7 +288,7 @@ sub process_check {
$com_status = "offline";
}
else {
if ( keys $data ) {
if ( keys %{$data} ) {
$self->{poll_data_timestamp} = &main::get_tickcount();
if ( $self->{poll_process_mode} eq "info" ) {
$self->{data}->{tempunits} = $data->{tempunits};
Expand Down Expand Up @@ -356,7 +356,7 @@ sub process_check {

}
else {
if ( keys $data ) {
if ( keys %{$data} ) {
if ( $data->{success} eq "true" ) {
shift @{ $self->{cmd_queue} }; #remove the command from queue since it was successful
$self->{cmd_process_retry} = 0;
Expand Down

0 comments on commit f9909a3

Please sign in to comment.