mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-03 16:56:54 +00:00
98_openweathermap - added set command "clear" to delete readings.
git-svn-id: https://svn.fhem.de/fhem/trunk@5294 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
fd453851e6
commit
f42e870f8f
@ -1,7 +1,8 @@
|
||||
# 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.
|
||||
- SVN
|
||||
- change: MAX: interpret SetTemperature command from WT to HT
|
||||
- change: openweathermap: added set command „clear“
|
||||
- change: MAX: interpret SetTemperature command from WT to HT
|
||||
- feature: MAX: retry packets 3 times if missing an ack
|
||||
- feature: new module 98_cloneDummy.pm added (Joachim)
|
||||
- feature: STACKABLE_CC (busware.de device for the RPi) added
|
||||
|
@ -61,6 +61,9 @@
|
||||
# 2014-02-04 added: shutdownFn
|
||||
#
|
||||
# 2014-02-14 modi: changed Loglevel from 3 to 4 where possible
|
||||
#
|
||||
# 2014-03-22 added: added set command 'clear'
|
||||
#
|
||||
|
||||
package main;
|
||||
|
||||
@ -113,7 +116,7 @@ sub OWO_Shutdown($) {
|
||||
sub OWO_Set($@){
|
||||
my ($hash, @a) = @_;
|
||||
my $name = $hash->{NAME};
|
||||
my $usage = "Unknown argument, choose one of stationById stationByGeo stationByName send:noArg";
|
||||
my $usage = "Unknown argument, choose one of clear:noArg stationById stationByGeo stationByName send:noArg";
|
||||
my $response;
|
||||
|
||||
return "No Argument given" if(!defined($a[1]));
|
||||
@ -126,6 +129,13 @@ sub OWO_Set($@){
|
||||
given($cmd){
|
||||
when("?") { return $usage; }
|
||||
|
||||
when("clear"){
|
||||
CommandDeleteReading(undef, "$name _.*");
|
||||
CommandDeleteReading(undef, "$name c_.*");
|
||||
CommandDeleteReading(undef, "$name g_.*");
|
||||
return;
|
||||
}
|
||||
|
||||
when("send"){
|
||||
OWO_GetStatus($hash,1);
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user