mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
74_Unifi: small fix in voucherCache
git-svn-id: https://svn.fhem.de/fhem/trunk@16100 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
6ea49a1195
commit
4a1302a98e
@ -591,9 +591,9 @@ sub Unifi_Get($@) {
|
|||||||
my $returnedVoucherCode = "";
|
my $returnedVoucherCode = "";
|
||||||
if(defined $returnedVoucher->{_id}){
|
if(defined $returnedVoucher->{_id}){
|
||||||
$returnedVoucherCode = $returnedVoucher->{code};
|
$returnedVoucherCode = $returnedVoucher->{code};
|
||||||
if ($hash->{hotspot}->{voucherCache}->{$getVal}->{setCmd} ne ""){
|
#if (defined $hash->{hotspot}->{voucherCache}->{$getVal}->{setCmd}){
|
||||||
$hash->{hotspot}->{voucherCache}->{$getVal}->{$returnedVoucher->{_id}}->{delivered_at} = time();
|
$hash->{hotspot}->{voucherCache}->{$getVal}->{$returnedVoucher->{_id}}->{delivered_at} = time();
|
||||||
}
|
#}
|
||||||
}
|
}
|
||||||
return $returnedVoucherCode;
|
return $returnedVoucherCode;
|
||||||
}
|
}
|
||||||
@ -1242,6 +1242,7 @@ sub Unifi_SetVoucherReadings($) {
|
|||||||
#für jeden Vouchercache den nächsten Vouchercode als Reading anzeigen
|
#für jeden Vouchercache den nächsten Vouchercode als Reading anzeigen
|
||||||
for my $cache (keys %{$hash->{hotspot}->{voucherCache}}) {
|
for my $cache (keys %{$hash->{hotspot}->{voucherCache}}) {
|
||||||
if(ref($hash->{hotspot}->{voucherCache}->{$cache}) eq "HASH"){
|
if(ref($hash->{hotspot}->{voucherCache}->{$cache}) eq "HASH"){
|
||||||
|
if(defined $hash->{hotspot}->{voucherCache}->{$cache}->{setCmd}){
|
||||||
my $voucher=Unifi_getNextVoucherForNote($hash,$cache);
|
my $voucher=Unifi_getNextVoucherForNote($hash,$cache);
|
||||||
if(ref($voucher) eq "HASH"){
|
if(ref($voucher) eq "HASH"){
|
||||||
readingsBulkUpdate($hash,"-VC_".$cache,$voucher->{code});
|
readingsBulkUpdate($hash,"-VC_".$cache,$voucher->{code});
|
||||||
@ -1250,6 +1251,7 @@ sub Unifi_SetVoucherReadings($) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user