bugfix: MQTT: undef patch

git-svn-id: https://svn.fhem.de/fhem/trunk@14534 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
eisler
2017-06-18 08:48:07 +00:00
parent 30c65f8b1d
commit e2ac00d2d9
2 changed files with 11 additions and 5 deletions

View File

@@ -1,9 +1,10 @@
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # 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. # Do not insert empty lines here, update check depends on it.
- bugfix: MQTT: undef patch
- bugfix: ESPEasy: added missing event command (Forum #73291) - bugfix: ESPEasy: added missing event command (Forum #73291)
- bugfix: YAMAHA_AVR: use DSP-based commands for RX-V2065 - bugfix: YAMAHA_AVR: use DSP-based commands for RX-V2065
- bugfix: 10_MQTT_DEVICE.pm: publishSet patch (Forum #msg648963) - bugfix: MQTT_DEVICE: publishSet patch (Forum #msg648963)
- feature: 10_MQTT_DEVICE.pm: publishSet patch (Forum #msg648596) - feature: MQTT_DEVICE: publishSet patch (Forum #msg648596)
- feature: 01_FHEMWEB.pm: selectnumbers widget modifier (Forum #73188) - feature: 01_FHEMWEB.pm: selectnumbers widget modifier (Forum #73188)
- feature: 98_structure.pm: add evaluateSetResult attribute (Forum #73113) - feature: 98_structure.pm: add evaluateSetResult attribute (Forum #73113)
- feature: ESPEasy: improved defineFn if bridge port is missing, docu update - feature: ESPEasy: improved defineFn if bridge port is missing, docu update

View File

@@ -52,6 +52,7 @@ sub MQTT_Initialize($) {
# Consumer # Consumer
$hash->{DefFn} = "MQTT::Define"; $hash->{DefFn} = "MQTT::Define";
$hash->{UndefFn} = "MQTT::Undef"; $hash->{UndefFn} = "MQTT::Undef";
$hash->{DeleteFn} = "MQTT::Delete";
$hash->{SetFn} = "MQTT::Set"; $hash->{SetFn} = "MQTT::Set";
$hash->{NotifyFn} = "MQTT::Notify"; $hash->{NotifyFn} = "MQTT::Notify";
@@ -118,10 +119,14 @@ sub Define($$) {
} }
} }
sub Undef($) { sub Undef($$) {
my $hash = shift; my ($hash, $name) = @_;
Stop($hash); Stop($hash);
my $name = $hash->{NAME}; return undef;
}
sub Delete($$) {
my ($hash, $name) = @_;
setKeyValue($name."_user",undef); setKeyValue($name."_user",undef);
setKeyValue($name."_pass",undef); setKeyValue($name."_pass",undef);
return undef; return undef;