From 4c7b8b006564f43497cc72ad8095f3d036a709c9 Mon Sep 17 00:00:00 2001 From: Shojo <> Date: Thu, 27 Jun 2019 17:47:10 +0000 Subject: [PATCH] huedevice.template: New template for HUEDevice git-svn-id: https://svn.fhem.de/fhem/trunk@19723 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/CHANGED | 1 + fhem/FHEM/lib/AttrTemplate/huedevice.template | 93 +++++++++++++++++++ fhem/MAINTAINER.txt | 1 + 3 files changed, 95 insertions(+) create mode 100644 fhem/FHEM/lib/AttrTemplate/huedevice.template diff --git a/fhem/CHANGED b/fhem/CHANGED index d4f8b58a6..bbc3b2676 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -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. + - new: huedevice.template: New template for HUEDevice - feature: 31_HUEDevice: allow perl code with setList and configList attributes - bugfix: 95_Astro: v2.0.2: Calculate astronomical season based on ecliptic latitude instead of static day of the year to make season diff --git a/fhem/FHEM/lib/AttrTemplate/huedevice.template b/fhem/FHEM/lib/AttrTemplate/huedevice.template new file mode 100644 index 000000000..c42f5df82 --- /dev/null +++ b/fhem/FHEM/lib/AttrTemplate/huedevice.template @@ -0,0 +1,93 @@ +########################################### +# $Id: $ +# +# Comments start with #. Empty lines are ignored. +# Syntax of one entry: name: line, one optional filter: line, zero or more par: lines, FHEM-Commands +# filter:INTERNAL=VALUE (optional) +# par: name of the parameter; comment; perl_code (optional) +# perl_code returns a value for the parameter, or undef. +# If undef, the user has to specify them (the comment is shown to the user) + + +########################################### +# Eurotronic Spirit ZigBee (SPZB0001) +name:C_01_Eurotronic_SPZB0001_Spirit_ZigBee +filter:TYPE=HUEDevice +desc: All necessary attr are set and also a helper CMDAlias for the Eurotronic Spirit ZigBee thermostat.
Manufacturer link: Klick me +attr DEVICE configList /mode (.*)/:{"mode":"$1"}\ +/heatsetpoint (.*)/:perl:{'{"heatsetpoint":' . $VALUE1 * 100 . '}'}\ +/displayflipped (.*)/:{"displayflipped": $1 }\ +lock:{"locked": true }\ +unlock:{"locked": false } +attr DEVICE widgetOverride mode:auto,heat,off displayflipped:true,false heatsetpoint:16,16.5,17,17.5,18,18.5,19,19.5,20,20.5,21,21.5,22 +attr DEVICE icon max_heizungsthermostat +# Helper CMDAlias heatsetpointX100 +#par:DeviceRoom;Room of the Device.;{AttrVal("heatsetpointX100","room","HUEDevice" )} +#defmod heatsetpointX100 cmdalias set .* heatsetpoint .* AS {fhem("set $EVTPART0 $EVTPART1 ". $EVTPART2 * 100)} +#attr heatsetpointX100 room DeviceRoom +#attr heatsetpointX100 comment This is an help CMDAlias for the Eurotronic Eurotronic Spirit ZigBee (SPZB0001).\ +#This CMDAlias prepares the value of heatsetpoint for the Hue/deCONZ API (multiplies the value by 100). + + +########################################### +# Xiaomi/Aqara MCCGQ11LM Fenster Tür Sensor +name:D_01_Xiaomi_Aqara_MCCGQ11LM_Window_Door_Sensor +filter:TYPE=HUEDevice +desc: The Xiaomi/Aqara window door sensor is a single sensor and interprets a normally closed contact .
Manufacturer link: Klick me +attr DEVICE devStateIcon open:fts_window_1w_open@#e56524 closed:fts_window_1w + + +########################################### +# Xiaomi/Aqara WSDCGQ11LM Temperatur Sensor +name:E_01a_Xiaomi_Aqara_WSDCGQ11LM_Temperature_Sensor +filter:TYPE=HUEDevice +desc: The Xiaomi/Aqara temperature, humidity and pressure sensor is a multisensor, and is interpreted by ZigBee as three sensors that is temperature sensor.
Manufacturer link: Klick me +attr DEVICE icon xiaomi_multi +attr DEVICE stateFormat T: temperature °C + +# Xiaomi/Aqara WSDCGQ11LM Pressure Sensor +name:E_01b_Xiaomi_Aqara_WSDCGQ11LM_Pressure_Sensor +filter:TYPE=HUEDevice +desc: The Xiaomi/Aqara temperature, humidity and pressure sensor is a multisensor, and is interpreted by ZigBee as three sensors that is pressure sensor.
Manufacturer link: Klick me +attr DEVICE icon xiaomi_multi +attr DEVICE stateFormat P: pressure hPa + +# Xiaomi/Aqara WSDCGQ11LM Humidity Sensor +name:E_01c_Xiaomi_Aqara_WSDCGQ11LM_Humidity_Sensor +filter:TYPE=HUEDevice +desc: The Xiaomi/Aqara temperature, humidity and pressure sensor is a multisensor, and is interpreted by ZigBee as three sensors that is humidity sensor.
Manufacturer link: Klick me +attr DEVICE icon xiaomi_multi +attr DEVICE stateFormat H: humidity % + + +########################################### +# Xiaomi/Aqara RTCGQ11LM Motion Sensor +name:F_01a_Xiaomi_Aqara_RTCGQ11LM_Motion_Sensor +filter:TYPE=HUEDevice +desc: The Xiaomi/Aqara motion sensor is a multisensor, and is interpreted by ZigBee as two sensors that is motion sensor.
Manufacturer link: Klick me +attr DEVICE devStateIcon motion:people_sensor nomotion:message_presence +attr DEVICE icon motion_detector + +# Xiaomi/Aqara RTCGQ11LM Lightlevel Sensor +name:F_01a_Xiaomi_Aqara_RTCGQ11LM_Lightlevel_Sensor +filter:TYPE=HUEDevice +desc: The Xiaomi/Aqara motion sensor is a multisensor, and is interpreted by ZigBee as two sensors that is lightlevel sensor.
Manufacturer link: Klick me +attr DEVICE icon IR +attr DEVICE stateFormat lux Lux + + +########################################### +# Xiaomi/Aqara WXKG02LM Double Switch +name:G_01_Xiaomi_Aqara_WXKG02LM_Double_Switch +filter:TYPE=HUEDevice +desc: The Xiaomi/Aqara Double Switch is double switch.
Manufacturer link: Klick me +attr DEVICE eventMap 1001:LeftLongPress\ +1002:LeftShortPress \ +1004:LeftDoublePress\ +2001:RightLongPress \ +2002:RightShortPress\ +2004:RightDoublePress\ +3001:DoubleLongPress\ +3002:DoubleShortPress \ +3004:DoubleDoublePress +attr DEVICE icon taster \ No newline at end of file diff --git a/fhem/MAINTAINER.txt b/fhem/MAINTAINER.txt index 6dc74185f..a26c3a4fd 100644 --- a/fhem/MAINTAINER.txt +++ b/fhem/MAINTAINER.txt @@ -570,6 +570,7 @@ FHEM/FhemUtils/* mfr69bs Sonstiges FHEM/holiday/* jeschkec Sonstiges FHEM/lib/*deviceconfig.xml.gz krikan ZWave FHEM/lib/*manufacturer_specific.xml krikan ZWave +FHEM/lib/AttrTemplate/huedevice.template Shojo https://forum.fhem.de/index.php/topic,97694.0.html FHEM/lib/AttrTemplate/httpmod.template Beta-User https://forum.fhem.de/index.php/topic,97694.0.html FHEM/lib/AttrTemplate/mqtt2.template Beta-User https://forum.fhem.de/index.php/topic,94494.0.html FHEM/lib/AttrTemplate/mysensors.template Beta-User Bastelecke/MySensors