From 5374aa55506bfacfa9f4aa733678d4a6fc1c5a53 Mon Sep 17 00:00:00 2001 From: mr_p <> Date: Tue, 26 Jan 2010 23:35:34 +0000 Subject: [PATCH] Added CUL_WS to the type-list, so the unit-type for temperature and humidity is inserted in the db. git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@568 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- contrib/dblog/93_DbLog.pm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/contrib/dblog/93_DbLog.pm b/contrib/dblog/93_DbLog.pm index 0f43727b4..711f1960a 100755 --- a/contrib/dblog/93_DbLog.pm +++ b/contrib/dblog/93_DbLog.pm @@ -196,7 +196,14 @@ DbLog_ParseEvent($$) $value=~ s/replaced/1/; $value=~ s/empty/0/; } - } + } + + # CUL_WS + elsif($type eq "CUL_WS") { + if($event =~ m(T:.*)) { $reading= "data"; $value= $event; } + if($reading eq "temperature") { $unit= "°C"; } + if($reading eq "humidity") { $unit= "%"; } + } @result= ($reading,$value,$unit);