mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-02-25 03:44:52 +00:00
98_vitoconnect: fix order of days for type schedule readings
git-svn-id: https://svn.fhem.de/fhem/trunk@29690 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
5b201dd931
commit
7b1fb6d940
@ -93,6 +93,8 @@ use FHEM::SynoModules::SMUtils qw (
|
|||||||
); # Hilfsroutinen Modul
|
); # Hilfsroutinen Modul
|
||||||
|
|
||||||
my %vNotesIntern = (
|
my %vNotesIntern = (
|
||||||
|
"0.8.3" => "23.02.2025 fix order of days in type schedule readings",
|
||||||
|
"0.8.2" => "22.02.2025 improved State reading in case of unknown error",
|
||||||
"0.8.1" => "20.02.2025 replace U+FFFD (unknown character with [VUC] see https://forum.fhem.de/index.php?msg=1334504, also fill reason in error case from extended payload",
|
"0.8.1" => "20.02.2025 replace U+FFFD (unknown character with [VUC] see https://forum.fhem.de/index.php?msg=1334504, also fill reason in error case from extended payload",
|
||||||
"0.8.0" => "18.02.2025 enhanced error mapping now also language dependent, closing of file_handles, removed JSON::XS",
|
"0.8.0" => "18.02.2025 enhanced error mapping now also language dependent, closing of file_handles, removed JSON::XS",
|
||||||
"0.7.8" => "17.02.2025 fixed undef warning thanks cnkru",
|
"0.7.8" => "17.02.2025 fixed undef warning thanks cnkru",
|
||||||
@ -3431,6 +3433,7 @@ sub vitoconnect_getResourceCallback {
|
|||||||
my $hash = $param->{hash};
|
my $hash = $param->{hash};
|
||||||
my $name = $hash->{NAME};
|
my $name = $hash->{NAME};
|
||||||
my $gw = AttrVal( $name, 'vitoconnect_serial', 0 );
|
my $gw = AttrVal( $name, 'vitoconnect_serial', 0 );
|
||||||
|
my @days = qw(mon tue wed thu fri sat sun); # Reihenfolge der Wochentage festlegen für type Schedule
|
||||||
|
|
||||||
Log(5,$name.", -getResourceCallback started");
|
Log(5,$name.", -getResourceCallback started");
|
||||||
Log3($name,5,$name." getResourceCallback calles with gw:".$gw);
|
Log3($name,5,$name." getResourceCallback calles with gw:".$gw);
|
||||||
@ -3571,7 +3574,13 @@ sub vitoconnect_getResourceCallback {
|
|||||||
readingsBulkUpdate($hash,$Reading,$comma_separated_string);
|
readingsBulkUpdate($hash,$Reading,$comma_separated_string);
|
||||||
}
|
}
|
||||||
elsif ( $Type eq "Schedule" ) {
|
elsif ( $Type eq "Schedule" ) {
|
||||||
my $Result = encode_json($Value);
|
my @schedule;
|
||||||
|
foreach my $day (@days) {
|
||||||
|
if (exists $Value->{$day}) {
|
||||||
|
push @schedule, { $day => $Value->{$day} };
|
||||||
|
}
|
||||||
|
}
|
||||||
|
my $Result = encode_json(\@schedule);
|
||||||
readingsBulkUpdate($hash, $Reading, $Result);
|
readingsBulkUpdate($hash, $Reading, $Result);
|
||||||
Log3($name, 5, "$name - $Reading: $Result ($Type)");
|
Log3($name, 5, "$name - $Reading: $Result ($Type)");
|
||||||
}
|
}
|
||||||
@ -3869,7 +3878,9 @@ sub vitoconnect_errorHandling {
|
|||||||
return(1);
|
return(1);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
readingsSingleUpdate($hash,"state","unbekannter Fehler, bitte den Entwickler informieren!",1);
|
readingsSingleUpdate($hash,"state","unbekannter Fehler, bitte den Entwickler informieren! (Typ: "
|
||||||
|
. ($items->{errorType} // 'undef') . " Grund: "
|
||||||
|
. ($items->{extendedPayload}->{reason} // 'NA') . ")",1);
|
||||||
Log3 $name, 1, "$name - unbekannter Fehler: "
|
Log3 $name, 1, "$name - unbekannter Fehler: "
|
||||||
. "Bitte den Entwickler informieren!";
|
. "Bitte den Entwickler informieren!";
|
||||||
Log3 $name, 1, "$name - statusCode: " . ($items->{statusCode} // 'undef') . " "
|
Log3 $name, 1, "$name - statusCode: " . ($items->{statusCode} // 'undef') . " "
|
||||||
|
Loading…
x
Reference in New Issue
Block a user