2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-25 22:09:21 +00:00

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 15a30e6160
commit b82eb7a5c4

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;