FIX: set state always with readings

FIXES: #16
TIME: 5m
This commit is contained in:
Dominik Meyer 2024-03-01 20:49:33 +01:00
parent bb3249fb19
commit 73c60ae498
Signed by: byterazor
GPG Key ID: EABDA0FD5981BC97

View File

@ -137,11 +137,12 @@ sub NTFY_Define
$hash->{NAME} = $name; $hash->{NAME} = $name;
$hash->{SERVER} = $params->[2]; $hash->{SERVER} = $params->[2];
$hash->{STATE} = "unknown";
$hash->{USERNAME} = $h->{user} || ""; $hash->{USERNAME} = $h->{user} || "";
$hash->{helper}{PASSWORD} = $h->{password}; $hash->{helper}{PASSWORD} = $h->{password};
$modules{NTFY_CLIENT}{defptr}{$hash->{SERVER}} = $hash; $modules{NTFY_CLIENT}{defptr}{$hash->{SERVER}} = $hash;
readingsSingleUpdate($hash, "state", "passive",1);
return; return;
} }