2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 06:39:11 +00:00

00_MQTT: added delete

git-svn-id: https://svn.fhem.de/fhem/trunk@15082 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
eisler 2017-09-17 16:09:28 +00:00
parent 63fef2ceac
commit 6964d519ac
2 changed files with 9 additions and 0 deletions

View File

@ -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

View File

@ -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);