72_XiaomiDevice: check for uninitialized model

git-svn-id: https://svn.fhem.de/fhem/trunk@16377 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
moises
2018-03-10 19:22:52 +00:00
parent 3dcf7739bd
commit b6070571a5

View File

@@ -533,7 +533,7 @@ sub XiaomiDevice_Set($$@) {
$list .= ' carpet_mode:on,off' if($hash->{model} ne "rockrobo.vacuum.v1");
$list .= ' sleep:noArg wakeup:noArg';
$list .= ' fan_power:slider,1,1,100' if($hash->{model} eq "rockrobo.vacuum.v1");
$list .= ' fan_power:slider,1,1,100' if(defined($hash->{model}) && $hash->{model} eq "rockrobo.vacuum.v1");
$list .= ' cleaning_mode:quiet,balanced,turbo,max,mop';
@@ -1529,7 +1529,7 @@ sub XiaomiDevice_GetSettings($)
$hash->{helper}{packet}{$packetid} = "get_sound_volume";
XiaomiDevice_WriteJSON($hash, '{"id":'.$packetid.',"method":"get_sound_volume","params":[""]}' );
return undef if($hash->{model} eq "rockrobo.vacuum.v1");
return undef if(defined($hash->{model}) && $hash->{model} eq "rockrobo.vacuum.v1");
$packetid = $hash->{helper}{packetid};
$hash->{helper}{packetid} = $packetid+1;