From 12e9d2c7c16f41dc8eb4ad44cea2dfb0f7791c1e Mon Sep 17 00:00:00 2001 From: borisneubert Date: Sun, 6 Jan 2013 15:38:33 +0000 Subject: [PATCH] added model attribute to OWDevice git-svn-id: https://fhem.svn.sourceforge.net/svnroot/fhem/trunk/fhem@2440 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- FHEM/11_OWDevice.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/FHEM/11_OWDevice.pm b/FHEM/11_OWDevice.pm index e010e88df..99874534f 100644 --- a/FHEM/11_OWDevice.pm +++ b/FHEM/11_OWDevice.pm @@ -22,6 +22,8 @@ # ############################################################################## +# Todos: +# - stateFormat via Interface package main; @@ -40,7 +42,7 @@ OWDevice_Initialize($) $hash->{DefFn} = "OWDevice_Define"; $hash->{AttrFn} = "OWDevice_Attr"; - $hash->{AttrList} = "trimvalues polls interfaces loglevel:0,1,2,3,4,5 ". + $hash->{AttrList} = "trimvalues polls interfaces model loglevel:0,1,2,3,4,5 ". $readingFnAttributes; } @@ -324,6 +326,7 @@ OWDevice_Define($$) $hash->{fhem}{polls}= $pollsref; Log 5, "$name: polls: " . join(" ", @polls); + $attr{$name}{model}= OWDevice_ReadValue($hash, "type"); OWDevice_UpdateValues($hash) if(defined($hash->{fhem}{interval})); return undef; @@ -451,6 +454,7 @@ OWDevice_Define($$)
  • trimvalues: removes leading and trailing whitespace from readings. Default is 1 (on).
  • polls: a comma-separated list of readings to poll. This supersedes the list of default readings to poll.
  • interfaces: supersedes the interfaces exposed by that device.
  • +
  • model: preset with device type, e.g. DS18S20.
  • loglevel
  • eventMap
  • readingFnAttributes