diff --git a/71_XiaomiSmartHome.pm b/71_XiaomiSmartHome.pm
index 7377493..bc3516b 100644
--- a/71_XiaomiSmartHome.pm
+++ b/71_XiaomiSmartHome.pm
@@ -234,31 +234,33 @@ sub XiaomiSmartHome_disconnect($)
1;
=pod
-=item [helper|device|command]
+=item device
=item summary Module fpr XiaomiSmartHome Gateway to use with FHEM
-=item summary_DE Modul um ein XiaomiSmartHome Gateyway in FHEM bekannt zu machen
+=item summary_DE Modul um ein XiaomiSmartHome Gateyway in FHEM zu nutzen
=begin html
-
-
xiaomismarthome
+
+
+XiaomiSmartHome
XiaomiSmartHome implements the XiaomiSmartHome Gateway and Sensors.
+
Define
define <name> XiaomiSmartHome <IP or Hostname>
Example: define XiaomiSmartHome XiaomiSmartHome 192.168.1.xxx
-
=end html
=begin html_DE
-
-xiaomismarthome
+
+
+XiaomiSmartHome
XiaomiSmartHome implements the XiaomiSmartHome Gateway and Sensors.
diff --git a/71_XiaomiSmartHome_Device.pm b/71_XiaomiSmartHome_Device.pm
index 379b393..8ae1d4b 100644
--- a/71_XiaomiSmartHome_Device.pm
+++ b/71_XiaomiSmartHome_Device.pm
@@ -35,7 +35,9 @@ sub XiaomiSmartHome_Device_mot($$)
sub XiaomiSmartHome_Device_on_timeout($){
my ($hash) = @_;
- readingsSingleUpdate($hash, "state", "off", 1 );
+ if ($hash->{STATE} eq 'motion') {
+ readingsSingleUpdate($hash, "state", "off", 1 );
+ }
}
#####################################
@@ -116,6 +118,7 @@ sub XiaomiSmartHome_Device_Define($$) {
AssignIoPort($hash);
}
+#####################################
sub XiaomiSmartHome_Device_Undef($)
{