mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 12:49:34 +00:00
00_HMUARTLGW.pm: gracefully handle an unset hmId (use id of io)
git-svn-id: https://svn.fhem.de/fhem/trunk@11844 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
57b0698c0e
commit
acf0bde094
@ -151,6 +151,7 @@ sub HMUARTLGW_Initialize($)
|
||||
|
||||
sub HMUARTLGW_SendPendingCmd($);
|
||||
sub HMUARTLGW_SendCmd($$);
|
||||
sub HMUARTLGW_GetSetParameterReq($);
|
||||
sub HMUARTLGW_getAesKeys($);
|
||||
sub HMUARTLGW_updateMsgLoad($$);
|
||||
sub HMUARTLGW_Read($);
|
||||
@ -696,6 +697,10 @@ sub HMUARTLGW_GetSetParameterReq($) {
|
||||
if ($hash->{DevState} == HMUARTLGW_STATE_SET_HMID) {
|
||||
my $hmId = AttrVal($name, "hmId", undef);
|
||||
|
||||
if (!defined($hmId)) {
|
||||
$hash->{DevState} = HMUARTLGW_STATE_GET_HMID;
|
||||
return HMUARTLGW_GetSetParameterReq($hash);
|
||||
}
|
||||
HMUARTLGW_send($hash, HMUARTLGW_APP_SET_HMID . $hmId, HMUARTLGW_DST_APP);
|
||||
|
||||
} elsif ($hash->{DevState} == HMUARTLGW_STATE_GET_HMID) {
|
||||
|
Loading…
Reference in New Issue
Block a user