diff --git a/fhem/FHEM/lib/AttrTemplate/mqtt2.template b/fhem/FHEM/lib/AttrTemplate/mqtt2.template index 778978811..d54c00b54 100644 --- a/fhem/FHEM/lib/AttrTemplate/mqtt2.template +++ b/fhem/FHEM/lib/AttrTemplate/mqtt2.template @@ -98,7 +98,8 @@ filter:TYPE=MQTT2_DEVICE:FILTER=CID=zigbee.* order:L_02a par:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[\b]?([^/:]+)[/].*:, ? $1 : undef } par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[^/]+[/]([^/]+).*:, ? $1 : undef } -attr DEVICE icon light_control +par:ICON;ICON as set, defaults to light_control;{ AttrVal("DEVICE","icon","light_control") } +attr DEVICE icon ICON attr DEVICE devStateIcon {zigbee2mqtt_devStateIcon255($name)} attr DEVICE webCmd toggle:on:off:brightness attr DEVICE readingList BASE_TOPIC/DEV_ID:.* { json2nameValue($EVENT) } @@ -116,7 +117,8 @@ desc: A dimmable light with color temperature via zigbee2mqtt order:L_02b par:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[\b]?([^/:]+)[/].*:, ? $1 : undef } par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[^/]+[/]([^/]+).*:, ? $1 : undef } -attr DEVICE icon light_control +par:ICON;ICON as set, defaults to light_control;{ AttrVal("DEVICE","icon","light_control") } +attr DEVICE icon ICON attr DEVICE webCmd toggle:on:off:brightness:color_temp attr DEVICE readingList BASE_TOPIC/DEV_ID:.* { json2nameValue($EVENT) } attr DEVICE setList \ @@ -133,7 +135,8 @@ desc: A dimmable rgb light connected via zigbee2mqtt
rgb value is encoded as order:L_02c par:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[\b]?([^/:]+)[/].*:, ? $1 : undef } par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[^/]+[/]([^/]+).*:, ? $1 : undef } -attr DEVICE icon hue_filled_white_and_color_e27_b22 +par:ICON;ICON as set, defaults to hue_filled_white_and_color_e27_b22;{ AttrVal("DEVICE","icon","hue_filled_white_and_color_e27_b22") } +attr DEVICE icon ICON attr DEVICE stateFormat {lc ReadingsVal($name,"state",0)} attr DEVICE devStateIcon {zigbee2mqtt_devStateIcon255($name)} attr DEVICE webCmd toggle:on:off:brightness:hex @@ -152,7 +155,8 @@ desc: A dimmable rgb light connected via zigbee2mqtt
rgb values will be sent order:L_02c par:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[\b]?([^/:]+)[/].*:, ? $1 : undef } par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[^/]+[/]([^/]+).*:, ? $1 : undef } -attr DEVICE icon hue_filled_white_and_color_e27_b22 +par:ICON;ICON as set, defaults to hue_filled_white_and_color_e27_b22;{ AttrVal("DEVICE","icon","hue_filled_white_and_color_e27_b22") } +attr DEVICE icon ICON attr DEVICE stateFormat {lc ReadingsVal($name,"state",0)} attr DEVICE devStateIcon {zigbee2mqtt_devStateIcon255($name)} attr DEVICE webCmd toggle:on:off:brightness:color @@ -171,7 +175,8 @@ desc: A dimmable rgbw light connected via zigbee2mqtt
rgb value is encoded a order:L_02d par:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[\b]?([^/:]+)[/].*:, ? $1 : undef } par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[^/]+[/]([^/]+).*:, ? $1 : undef } -attr DEVICE icon hue_filled_white_and_color_e27_b22 +par:ICON;ICON as set, defaults to hue_filled_white_and_color_e27_b22;{ AttrVal("DEVICE","icon","hue_filled_white_and_color_e27_b22") } +attr DEVICE icon ICON attr DEVICE stateFormat {lc ReadingsVal($name,"state",0)} attr DEVICE devStateIcon {zigbee2mqtt_devStateIcon255($name)} attr DEVICE webCmd toggle:on:off:brightness:color_temp:warm:white:hex @@ -194,7 +199,8 @@ order:L_02d1 desc: A dimmable rgbw light connected via zigbee2mqtt
rgb values will be sent as individual values r,g and b
Experimental, still untested par:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[\b]?([^/:]+)[/].*:, ? $1 : undef } par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[^/]+[/]([^/]+).*:, ? $1 : undef } -attr DEVICE icon hue_filled_white_and_color_e27_b22 +par:ICON;ICON as set, defaults to hue_filled_white_and_color_e27_b22;{ AttrVal("DEVICE","icon","hue_filled_white_and_color_e27_b22") } +attr DEVICE icon ICON attr DEVICE stateFormat {lc ReadingsVal($name,"state",0)} attr DEVICE devStateIcon {zigbee2mqtt_devStateIcon255($name)} attr DEVICE webCmd toggle:on:off:brightness:color:white @@ -214,7 +220,8 @@ filter:TYPE=MQTT2_DEVICE:FILTER=CID=zigbee.* order:L_02e par:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[\b]?([^/:]+)[/].*:, ? $1 : undef } par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[^/]+[/]([^/]+).*:, ? $1 : undef } -attr DEVICE icon hue_filled_white_and_color_e27_b22 +par:ICON;ICON as set, defaults to hue_filled_white_and_color_e27_b22;{ AttrVal("DEVICE","icon","hue_filled_white_and_color_e27_b22") } +attr DEVICE icon ICON attr DEVICE stateFormat {lc ReadingsVal($name,"state",0)} attr DEVICE devStateIcon {zigbee2mqtt_devStateIcon255($name)} attr DEVICE webCmd toggle:on:off:brightness:color_temp:hex @@ -234,7 +241,8 @@ order:L_02e1 desc: A dimmable rgb-cct light connected via zigbee2mqtt
rgb values will be sent as individual values r,g and b
Tested with: RGB-CCT GL-C-008 par:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[\b]?([^/:]+)[/].*:, ? $1 : undef } par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[^/]+[/]([^/]+).*:, ? $1 : undef } -attr DEVICE icon hue_filled_white_and_color_e27_b22 +par:ICON;ICON as set, defaults to hue_filled_white_and_color_e27_b22;{ AttrVal("DEVICE","icon","hue_filled_white_and_color_e27_b22") } +attr DEVICE icon ICON attr DEVICE stateFormat {lc ReadingsVal($name,"state",0)} attr DEVICE devStateIcon {zigbee2mqtt_devStateIcon255($name)} attr DEVICE webCmd toggle:on:off:brightness:color_temp:color @@ -252,8 +260,9 @@ filter:TYPE=MQTT2_DEVICE:FILTER=CID=zigbee.* order:L_03 par:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[\b]?([^/:]+)[/].*:, ? $1 : undef } par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[^/]+[/]([^/]+).*:, ? $1 : undef } +par:ICON;ICON as set, defaults to secur_smoke_detector;{ AttrVal("DEVICE","icon","secur_smoke_detector") } +attr DEVICE icon ICON attr DEVICE readingList BASE_TOPIC/DEV_ID:.* { json2nameValue($EVENT) } -attr DEVICE icon secur_smoke_detector attr DEVICE stateFormat smoke attr DEVICE model zigbee2mqtt_smokeDetector @@ -311,6 +320,8 @@ filter:TYPE=MQTT2_DEVICE:FILTER=CID=zigbee.* order:L_07 par:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[\b]?([^/:]+)[/].*:, ? $1 : undef } par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[^/]+[/]([^/]+).*:, ? $1 : undef } +par:ICON;ICON as set, defaults to temperature_humidity;{ AttrVal("DEVICE","icon","temperature_humidity") } +attr DEVICE icon ICON attr DEVICE stateFormat {sprintf ("Temperature: %.1f°C Humidity: %.1f%% Pressure: %.1fhpa", ReadingsVal($name,"temperature",0), ReadingsVal($name,"humidity",0), ReadingsVal($name,"pressure",0)) } attr DEVICE readingList BASE_TOPIC/DEV_ID:.* { json2nameValue($EVENT) } deletereading -q DEVICE (?!associatedWith).* @@ -323,7 +334,9 @@ filter:TYPE=MQTT2_DEVICE:FILTER=CID=zigbee.* order:L_07a par:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[\b]?([^/:]+)[/].*:, ? $1 : undef } par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[^/]+[/]([^/]+).*:, ? $1 : undef } -attr DEVICE stateFormat T: temperature H: humidity +par:ICON;ICON as set, defaults to temperature_humidity;{ AttrVal("DEVICE","icon","temperature_humidity") } +attr DEVICE icon ICON +attr DEVICE stateFormat {sprintf ("Temperature: %.1f°C Humidity: %.1f%%", ReadingsVal($name,"temperature",0), ReadingsVal($name,"humidity",0)) } attr DEVICE readingList BASE_TOPIC/DEV_ID:.* { json2nameValue($EVENT) } deletereading -q DEVICE (?!associatedWith).* attr DEVICE model zigbee2mqtt_TempHumSensor @@ -423,6 +436,19 @@ attr DEVICE readingList BASE_TOPIC/DEV_ID:.* { json2nameValue($EVENT) } deletereading -q DEVICE (?!associatedWith).* attr DEVICE model zigbee2mqtt_aqara_cube +#source post: https://forum.fhem.de/index.php/topic,94494.msg983905.html#msg983905 +name:zigbee2mqtt_AlarmSensor +desc: Alarm sensor via zigbee2mqtt
Can report actions drop, tilt or vibration as well as x,y,z coordinates of its movement.
Sensitivity can be set to low, medium or high.
Tested with: Xiaomi DJT11LM Vibration Sensor +filter:TYPE=MQTT2_DEVICE:FILTER=CID=zigbee.* +order:L_15 +par:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[\b]?([^/:]+)[/].*:, ? $1 : undef } +par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[^/]+[/]([^/]+).*:, ? $1 : undef } +attr DEVICE setList \ + sensitivity:low,medium,high BASE_TOPIC/DEV_ID/set {"sensitivity":"$EVTPART1"} +attr DEVICE stateFormat Action: action X: angle_X Y: angle_Y Z: angle_Z +attr DEVICE readingList BASE_TOPIC/DEV_ID:.* { json2nameValue($EVENT) } +deletereading -q DEVICE (?!associatedWith).* +attr DEVICE model zigbee2mqtt_AlarmSensor ########################################### @@ -557,6 +583,8 @@ par:POWERCMD;needed command to be sent like in example dec '{"protocol":"NEC","b par:VOLUMEUPCMD;needed command to be sent like in example raw '0,926,844,958,832,1798,868,902,848,900,870,900,852,908,918,958,794,934,874,928,1738,934,856,1764' (without '');{ undef } par:MULTIPLE1CMD;needed command to be sent like in example hex '{"Protocol":"NEC","Bits":32,"Data":0x8166817E}' (without '');{ undef } par:MULTIPLE2CMD;needed command to be sent like in example hex '{"Protocol":"NEC","Bits":32,"Data":0x8166817E}' (without '');{ undef } +par:ICON;ICON as set, defaults to IR;{ AttrVal("DEVICE","icon","IR") } +attr DEVICE icon ICON attr DEVICE setList \ power:noArg CMNDTOPIC/IRsend POWERCMD\ volumeup:noArg CMNDTOPIC/IRsend VOLUMEUPCMD\ @@ -569,7 +597,6 @@ attr DEVICE stateFormat state\
\ IPAddress attr DEVICE event-on-change-reading .* -attr DEVICE icon IR attr DEVICE model tasmota_ir #tasmota device with rf-circuit @@ -829,6 +856,8 @@ set DEVICE attrTemplate tasmota_basic_state_power1 par:CMNDTOPIC;Command topic prefix, without trailing /;{ AttrVal("DEVICE","readingList","") =~ m,([^:]*)\b(tele|cmnd|stat)(/.*)?/LWT:, ? "${1}cmnd$3" : undef } par:TELETOPIC;info topic prefix, without trailing /;{ AttrVal("DEVICE","readingList","") =~ m,([^:]*)\b(tele|cmnd|stat)(/.*)?/LWT:, ? "${1}tele$3" : undef } par:STATTOPIC;ack topic prefix, without trailing /;{ AttrVal("DEVICE","readingList","") =~ m,([^:]*)\b(tele|cmnd|stat)(/.*)?/LWT:, ? "${1}stat$3" : undef } +par:ICON;ICON as set, defaults to light_control;{ AttrVal("DEVICE","icon","light_control") } +attr DEVICE icon ICON attr DEVICE setList\ off:noArg CMNDTOPIC/POWER1 0\ on:noArg CMNDTOPIC/POWER1 1\ @@ -845,7 +874,6 @@ attr DEVICE readingList \ deletereading -q DEVICE (?!associatedWith).* attr DEVICE autocreate 0 attr DEVICE devStateIcon {Color::devStateIcon($name,"rgb","Color","Dimmer","POWER1")} -attr DEVICE icon light_control attr DEVICE stateFormat POWER1 attr DEVICE webCmd Color:Color ff0000:Color 00ff00:Color 0000ff:toggle:on:off attr DEVICE model tasmota_rgb_led_controller @@ -1243,6 +1271,8 @@ filter:TYPE=MQTT2_DEVICE:FILTER=readingList=.*shellies.* desc:shellybulb using original firmware
Tested with 1.49 order:A_15 par:DEVNAME;name of this shelly;{ AttrVal("DEVICE","readingList","") =~ m,shellies/([^/]+)/, ? $1 : undef } +par:ICON;ICON as set, defaults to light_control;{ AttrVal("DEVICE","icon","light_control") } +attr DEVICE icon ICON attr DEVICE setList\ off:noArg shellies/DEVNAME/color/0/command off\ on:noArg shellies/DEVNAME/color/0/command on\ @@ -1259,7 +1289,6 @@ attr DEVICE readingList shellies/DEVNAME/color/0/status:.* {json2nameValue($EVEN attr DEVICE userReadings ct:temp.* {ReadingsVal($name,"temp",3000)}, rgb:red.* {if(ReadingsVal($name,"mode","") eq "color"){sprintf("%02X%02X%02X", ReadingsVal($name,"red",99), ReadingsVal($name,"green",99), ReadingsVal($name,"blue",99))}else{my $a=sprintf("%02X",ReadingsVal($name,"brightness",0)*2.555);"$a$a$a"}} attr DEVICE webCmd on:off:pct:ct:rgb attr DEVICE genericDeviceType light -attr DEVICE icon light_control attr DEVICE model shellybulb # shellyht using original firmware @@ -1267,10 +1296,11 @@ name:shellyht filter:TYPE=MQTT2_DEVICE:FILTER=readingList=.*shellies.* desc:shellyht using original firmware
Just adds stateFormat and icon order:A_16 +par:ICON;ICON as set, defaults to temperature_humidity;{ AttrVal("DEVICE","icon","temperature_humidity") } +attr DEVICE icon ICON attr DEVICE setList \ x_update:noArg shellies/DEVNAME/command update_fw\ x_mqttcom shellies/DEVNAME/command $EVTPART1 -attr DEVICE icon temperature_humidity attr DEVICE stateFormat T: temperature °C H: humidity % B: battery % attr DEVICE model shellyht @@ -1282,6 +1312,8 @@ filter:TYPE=MQTT2_DEVICE:FILTER=readingList=.*shellies.* desc:shellyrgbw2 color mode
Tested with 1.5.0-rgbw2-hotfix1 order:A_17 par:DEVNAME;name of this shelly;{ AttrVal("DEVICE","readingList","") =~ m,shellies/([^/]+)/, ? $1 : undef } +par:ICON;ICON as set, defaults to light_control;{ AttrVal("DEVICE","icon","light_control") } +attr DEVICE icon ICON attr DEVICE setList\ off:noArg shellies/DEVNAME/color/0/command off\ on:noArg shellies/DEVNAME/color/0/command on\ @@ -1301,7 +1333,6 @@ attr DEVICE readingList \ attr DEVICE userReadings rgb:red.* {if(ReadingsVal($name,"mode","") eq "color"){sprintf("%02X%02X%02X", ReadingsVal($name,"red",99), ReadingsVal($name,"green",99), ReadingsVal($name,"blue",99))}else{my $a=sprintf("%02X",ReadingsVal($name,"brightness",0)*2.555);"$a$a$a"}} attr DEVICE webCmd on:off:white:gain:rgb:effect attr DEVICE setStateList on off -attr DEVICE icon light_control attr DEVICE devStateIcon {my $onl = ReadingsVal($name,"online","false") eq "true"?"10px-kreis-gruen":"10px-kreis-rot";; my $light = ReadingsVal($name,"state","off");; my $cons = ReadingsVal($name,"power","unknown");; "".FW_makeImage($onl)." ".FW_makeImage($light)."
Verbrauch: $cons
"} attr DEVICE model shelly2rgbw_color @@ -1311,6 +1342,8 @@ filter:TYPE=MQTT2_DEVICE:FILTER=readingList=.*shellies.* desc:shelly2rgbw configured with 4 white channels, one device for each channel
Tested with v1.4.8 order:A_17a par:DEVNAME;name of this shelly;{ AttrVal("DEVICE","readingList","") =~ m,shellies/([^/]*)/, ? $1 : undef } +par:ICON;ICON as set, defaults to light_control;{ AttrVal("DEVICE","icon","light_control") } +attr DEVICE icon ICON attr DEVICE readingList shellies/DEVNAME/white/0/status:.* {json2nameValue($EVENT)}\ shellies/DEVNAME/white/0:.* state\ shellies/DEVNAME/white/0/set:.* { json2nameValue($EVENT) }\ @@ -1327,7 +1360,6 @@ setreading DEVICE associatedWith DEVICE_CH1,DEVICE_CH2,DEVICE_CH4 attr DEVICE webCmd on:off:brightness attr DEVICE model shelly2rgbw_4w_split attr DEVICE comment Channel 1 for DEVICE, see also DEVICE_CH2, DEVICE_CH3 and DEVICE_CH4 -attr DEVICE icon light_control attr DEVICE autocreate 0 attr DEVICE setStateList on off copy DEVICE DEVICE_CH2 @@ -1374,11 +1406,12 @@ desc:Device containing all status messages from the ebus daemon itself
NOTE: order:E_01a par:DEVTYPE;Internal TYPE of the device; { InternalVal("DEVICE","TYPE",undef)} par:DEV_ID;base topic set ebus;{ AttrVal("DEVICE","readingList","") =~ m,[^:]+:?(ebus[a-zA-Z])[^/]*[/].*:, ? $1 : "ebusd" } +par:ICON;ICON as set, defaults to sani_boiler_temp;{ AttrVal("DEVICE","icon","sani_boiler_temp") } +attr DEVICE icon ICON modify DEVICE DEV_ID attr DEVICE autocreate 1 attr DEVICE bridgeRegexp (ebus..*?)/(bai|\d+|cc|e7f|ehp|f\d\d|hc|he.|hmu|hwc|mc|mc.\d|omu|omu.\d|pms|rcc|rcc.\d|sc|sdr_p|ui|uih|v\d\d|v81.\d|vd\d|vl\d|vr_\d\d|zeo)/.*:.* "$1_$2"\ (ebus..*?)/(global|broadcast|general|scan([^/]*))/.*:.* "$1" -attr DEVICE icon sani_boiler_temp attr DEVICE userReadings formatedUptime:uptime.* {my $m = ReadingsVal($name,"uptime",0)/60;; return sprintf "0 000 00:%02d", $m if $m < 60;; my $h = $m / 60;; $m %= 60;; return sprintf "0 000 %02d:%02d", $h, $m if $h < 24;; my $d = $h / 24;; $h %= 24;; return sprintf "0 %03d %02d:%02d", $d, $h, $m if $d <365;; my $y = $d / 365;; $d %= 365;; return sprintf "%d %03d %02d:%02d", $y, $d, $h, $m} attr DEVICE stateFormat Status: \ 1:running\ @@ -1424,8 +1457,9 @@ par:BASE_ID;BASE_ID typically is milight;{ AttrVal("DEVICE","readingList","") =~ par:GROUP_ID;number from 0 to 4 representing one of the channels of an original bridge or remote;{ AttrVal("DEVICE","readingList","") =~ m,[^/]+[/][^/]+[/][^/]+[/]([0-4]):, ? $1 : undef } par:REMOTE_ID;HEX number representing a specific remote or bridge;{ AttrVal("DEVICE","readingList","") =~ m,([^/]+)[/](0x[0-9a-fA-F]{1\,4})[/].*:, ? $2 : undef } par:BULB_TYPE;rgbw, cct, rgb_cct, rgb, fut089, ;{ AttrVal("DEVICE","readingList","") =~ m,[^/]+[/][^/]+[/][^/]+[/]([^/]+)[/].*:, ? $1 : undef } +par:ICON;ICON as set, defaults to light_control;{ AttrVal("DEVICE","icon","light_control") } +attr DEVICE icon ICON deletereading -q DEVICE .*_.* -attr DEVICE icon light_control attr DEVICE eventMap /set_white:Weiss/night_mode:Nacht/white_mode:white/ attr DEVICE devStateIcon {zigbee2mqtt_devStateIcon255($name,"hex",1)} attr DEVICE webCmd brightness:hue:command @@ -1483,8 +1517,9 @@ par:BASE_ID;BASE_ID typically is milight;{ AttrVal("DEVICE","readingList","") =~ par:GROUP_ID;number from 0 to 4 representing one of the channels of an original bridge or remote;{ AttrVal("DEVICE","readingList","") =~ m,[^/]+[/][^/]+[/][^/]+[/]([0-4]):, ? $1 : undef } par:REMOTE_ID;HEX number representing a specific remote or bridge;{ AttrVal("DEVICE","readingList","") =~ m,([^/]+)[/](0x[0-9a-fA-F]{1\,4})[/].*:, ? $2 : undef } par:BULB_TYPE;rgbw, cct, rgb_cct, rgb, fut089, ;{ AttrVal("DEVICE","readingList","") =~ m,[^/]+[/][^/]+[/][^/]+[/]([^/]+)[/].*:, ? $1 : undef } +par:ICON;ICON as set, defaults to light_control;{ AttrVal("DEVICE","icon","light_control") } +attr DEVICE icon ICON deletereading -q DEVICE .*_.* -attr DEVICE icon light_control attr DEVICE eventMap /set_white:Weiss/night_mode:Nacht/white_mode:white/on:on/off:off/ON:on/OFF:off/next_mode:Mode/mode_speed_up:Faster/mode_speed_down:Slower/level_up:Up/level_down:Down/ attr DEVICE devStateIcon {zigbee2mqtt_devStateIcon255($name)} attr DEVICE readingList \ @@ -1523,8 +1558,9 @@ par:BASE_ID;BASE_ID typically is milight;{ AttrVal("DEVICE","readingList","") =~ par:GROUP_ID;number from 0 to 4 representing one of the channels of an original bridge or remote;{ AttrVal("DEVICE","readingList","") =~ m,[^/]+[/][^/]+[/][^/]+[/]([0-4]):, ? $1 : undef } par:REMOTE_ID;HEX number representing a specific remote or bridge;{ AttrVal("DEVICE","readingList","") =~ m,([^/]+)[/](0x[0-9a-fA-F]{1\,4})[/].*:, ? $2 : undef } par:BULB_TYPE;rgbw, cct, rgb_cct, rgb, fut089, ;{ AttrVal("DEVICE","readingList","") =~ m,[^/]+[/][^/]+[/][^/]+[/]([^/]+)[/].*:, ? $1 : undef } +par:ICON;ICON as set, defaults to light_control;{ AttrVal("DEVICE","icon","light_control") } +attr DEVICE icon ICON deletereading -q DEVICE .*_.* -attr DEVICE icon light_control attr DEVICE eventMap /set_white:Weiss/night_mode:Nacht/white_mode:white/on:on/off:off/ON:on/OFF:off/next_mode:Mode/mode_speed_up:Faster/mode_speed_down:Slower/level_up:Up/level_down:Down/ attr DEVICE devStateIcon {zigbee2mqtt_devStateIcon255($name)} attr DEVICE readingList \ @@ -1556,8 +1592,9 @@ par:BASE_ID;BASE_ID typically is milight;{ AttrVal("DEVICE","readingList","") =~ par:GROUP_ID;number from 0 to 4 representing one of the channels of an original bridge or remote;{ AttrVal("DEVICE","readingList","") =~ m,[^/]+[/][^/]+[/][^/]+[/]([0-4]):, ? $1 : undef } par:REMOTE_ID;HEX number representing a specific remote or bridge;{ AttrVal("DEVICE","readingList","") =~ m,([^/]+)[/](0x[0-9a-fA-F]{1\,4})[/].*:, ? $2 : undef } par:BULB_TYPE;rgbw, cct, rgb_cct, rgb, fut089, ;{ AttrVal("DEVICE","readingList","") =~ m,[^/]+[/][^/]+[/][^/]+[/]([^/]+)[/].*:, ? $1 : undef } +par:ICON;ICON as set, defaults to light_control;{ AttrVal("DEVICE","icon","light_control") } +attr DEVICE icon ICON deletereading -q DEVICE .*_.* -attr DEVICE icon light_control attr DEVICE devStateIcon {zigbee2mqtt_devStateIcon255($name,'hex',1)} attr DEVICE readingList \ BASE_ID/states/REMOTE_ID/BULB_TYPE/GROUP_ID:.* { json2nameValue($EVENT) }\