From 68b3247c23b55e7bcc397b42e765d4368810531d Mon Sep 17 00:00:00 2001 From: Dominik Meyer Date: Sun, 18 Feb 2024 21:09:17 +0100 Subject: [PATCH] FIX: improved state handling for children --- FHEM/98_NTFY_CLIENT.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/FHEM/98_NTFY_CLIENT.pm b/FHEM/98_NTFY_CLIENT.pm index 32de676..184fb28 100644 --- a/FHEM/98_NTFY_CLIENT.pm +++ b/FHEM/98_NTFY_CLIENT.pm @@ -120,7 +120,7 @@ sub NTFY_Define $hash->{NAME} = $name; $hash->{SERVER} = $params->[2]; - $hash->{STATE} = "offline"; + $hash->{STATE} = "unknown"; $hash->{USERNAME} = $h->{user} || ""; $hash->{helper}{PASSWORD} = $h->{password}; $hash->{DEFAULT_TOPIC} = $h->{topic}; @@ -232,8 +232,8 @@ sub NTFY_WS_Handshake DevIo_SimpleWrite( $hash, '', 2 ); NTFY_LOG(LOG_ERROR, "websocket connected"); - - DoTrigger($hash->{PNAME}, "online"); + + readingsSingleUpdate($hash, "state", "online", 1); } sub NTFY_WS_CB