diff --git a/fhem/CHANGED b/fhem/CHANGED index a21a2855f..512dae2f2 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,5 +1,6 @@ # Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # Do not insert empty lines here, update check depends on it. + - bugfix: 00_MQTT: added delete - new: 83_IOhomecontrol: control IOhomecontrol devices via REST API - feature: 31_PLAYBULB: add support for Candle S Firmware 1.4 - feature: 73_GardenaSmartBridge: add attribut disabledForInterval diff --git a/fhem/FHEM/00_MQTT.pm b/fhem/FHEM/00_MQTT.pm index 0dc0f1303..6baefaab9 100644 --- a/fhem/FHEM/00_MQTT.pm +++ b/fhem/FHEM/00_MQTT.pm @@ -53,6 +53,7 @@ sub MQTT_Initialize($) { # Consumer $hash->{DefFn} = "MQTT::Define"; $hash->{UndefFn} = "MQTT::Undef"; + $hash->{DeleteFn} = "MQTT::Delete"; $hash->{ShutdownFn} = "MQTT::Shutdown"; $hash->{SetFn} = "MQTT::Set"; $hash->{NotifyFn} = "MQTT::Notify"; @@ -138,6 +139,13 @@ sub Undef($) { return undef; } +sub Delete($$) { + my ($hash, $name) = @_; + setKeyValue($name."_user",undef); + setKeyValue($name."_pass",undef); + return undef; +} + sub Shutdown($) { my $hash = shift; Stop($hash);