attrTemplate: zigbee2mqtt_light_rgbcct_rgb

Begonnen von TomLee, 06 Oktober 2022, 12:46:47

Vorheriges Thema - Nächstes Thema

TomLee

Ach ich verstehe, "default color temp (ct) value ..." sollte als Hinweis dienen, auf die Abkürzungen ct in den weiteren "Abfagen", ja warum nicht, dann doch beibehalten ?

Beta-User

Server: HP-elitedesk@Debian 12, aktuelles FHEM@ConfigDB | CUL_HM (VCCU) | MQTT2: MiLight@ESP-GW, BT@OpenMQTTGw | MySensors: seriell, v.a. 2.3.1@RS485 | ZWave | ZigBee@deCONZ | SIGNALduino | MapleCUN | RHASSPY
svn: u.a MySensors, Weekday-&RandomTimer, Twilight,  div. attrTemplate-files

TomLee

mir würde es so gefallen, ohne default ?


Zitat#source post: https://forum.fhem.de/index.php/topic,97303.msg905935.html#msg905935
name:zigbee2mqtt_light_rgbcct_rgb
filter:TYPE=MQTT2_DEVICE:FILTER=CID~zigbee.*
order:L_02e1
desc: A dimmable rgbw light connected via zigbee2mqtt<br>rgb value is encoded as HEX value<br>remove color_temp in setlist command <b>on</b> if default white is not desired<br>Tested with:<br><a href="https://www.zigbee2mqtt.io/devices/HG08008.html" target="_blank">Livarno Home LED ceiling light</a><br><a href="https://www.zigbee2mqtt.io/devices/404000_404005_404012_404019.html#m%25C3%25BCller%2520licht-404000%252F404005%252F404012%252F404019" target="_blank">Mueller Light tint RGBW bulb</a>
farewell:specified values ​​can be adjusted at any time in the setList attribute
par:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal('DEVICE','devicetopic',AttrVal('DEVICE','readingList','')) =~ m,[\b]?([^/:]+)[/].+, ? $1 : undef }
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal('DEVICE','devicetopic',AttrVal('DEVICE','readingList','')) =~ m,[^/]+[/]([^/:]+).*, ? $1 : undef }
par:BRIGHTNESS;brightness in <b>on</b>-command (numeric, 0-255, e.g. 120);undef
par:CTVALUE;ct-value (color temp) in <b>on</b>-command (numeric, 0-370, e.g. 320);undef
par:CTWARMVALUE;ct-value in <b>warm</b>-command (e.g. 320);undef
par:CTWHITEVALUE;ct-value in <b>white</b>-command (e.g. 250);undef
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 devStateIcon {zigbee2mqtt_devStateIcon255($name)}
attr DEVICE webCmd toggle:on:off:brightness:ct:rgb
attr DEVICE devicetopic BASE_TOPIC/DEV_ID
attr DEVICE readingList $\DEVICETOPIC:.* { my $ret=json2nameValue($EVENT,'',$JSONMAP); $ret->{state}=lc($ret->{state}) if defined $ret->{state}; return $ret }
attr DEVICE jsonMap color_temp:ct
attr DEVICE setList \
  on:noArg $\DEVICETOPIC/set {"brightness": BRIGHTNESS , "state":"ON", "color_temp": CTVALUE}\
  off:noArg $\DEVICETOPIC/set {"state":"OFF"}\
  brightness:colorpicker,BRI,0,5,255 $\DEVICETOPIC/set {"state":"on","$EVTPART0":"$EVTPART1"}\
  ct:colorpicker,CT,154,2,500 $\DEVICETOPIC/set {"color_temp":"$EVTPART1"}\
  warm:noArg $\DEVICETOPIC/set {"brightness": BRIGHTNESS , "color_temp": CTWARMVALUE}\
  white:noArg $\DEVICETOPIC/set {"brightness": BRIGHTNESS, "color_temp": CTWHITEVALUE}\
  rgb:colorpicker,RGB {"$\DEVICETOPIC/set ".zigbee2mqtt_RGB2JSON($EVTPART1)}
attr DEVICE userReadings rgb:color_y.* {Color::xyY2hex(ReadingsVal($name,'color_x',0),ReadingsVal($name,'color_y',0),ReadingsVal($name,'brightness',254))}
attr DEVICE comment The specified ct and brightness values in on and warm etc. commands ​​can be adjusted at any time via the setList attribute
set DEVICE attrTemplate speechcontrol_type_light_255
attr DEVICE model zigbee2mqtt_light_rgbcct_rgb
setreading DEVICE attrTemplateVersion 20221106

TomLee

und vlt. noch was, ist mir gestern aufgefallen als ich attrTemplate ? aufgerufen hatte, ich wär dafür das man einen Forum Thread in jedem Template in der desc verlinkt.
Und der Link sollte immer in einem neuen Tab aufgerufen werden (target="_blank"), das nicht bei allen Templates, die bisher einen Link haben, so.

Also auch noch ergänzen, welcher dort drin steht überlass ich dir, ich hab hier den über dem Template eingesetzt:

Zitat#source post: https://forum.fhem.de/index.php/topic,97303.msg905935.html#msg905935
name:zigbee2mqtt_light_rgbcct_rgb
filter:TYPE=MQTT2_DEVICE:FILTER=CID~zigbee.*
order:L_02e1
desc: <a href="https://forum.fhem.de/index.php/topic,97303.msg905935.html#msg905935" target="_blank">Forum Thread</a><br>A dimmable rgbw light connected via zigbee2mqtt<br>rgb value is encoded as HEX value<br>remove color_temp in setlist command <b>on</b> if default white is not desired<br>Tested with:<br><a href="https://www.zigbee2mqtt.io/devices/HG08008.html" target="_blank">Livarno Home LED ceiling light</a><br><a href="https://www.zigbee2mqtt.io/devices/404000_404005_404012_404019.html#m%25C3%25BCller%2520licht-404000%252F404005%252F404012%252F404019" target="_blank">Mueller Light tint RGBW bulb</a>
farewell:specified values ​​can be adjusted at any time in the setList attribute
par:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal('DEVICE','devicetopic',AttrVal('DEVICE','readingList','')) =~ m,[\b]?([^/:]+)[/].+, ? $1 : undef }
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal('DEVICE','devicetopic',AttrVal('DEVICE','readingList','')) =~ m,[^/]+[/]([^/:]+).*, ? $1 : undef }
par:BRIGHTNESS;brightness in <b>on</b>-command (numeric, 0-255, e.g. 120);undef
par:CTVALUE;ct-value (color temp) in <b>on</b>-command (numeric, 0-370, e.g. 320);undef
par:CTWARMVALUE;ct-value in <b>warm</b>-command (e.g. 320);undef
par:CTWHITEVALUE;ct-value in <b>white</b>-command (e.g. 250);undef
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 devStateIcon {zigbee2mqtt_devStateIcon255($name)}
attr DEVICE webCmd toggle:on:off:brightness:ct:rgb
attr DEVICE devicetopic BASE_TOPIC/DEV_ID
attr DEVICE readingList $\DEVICETOPIC:.* { my $ret=json2nameValue($EVENT,'',$JSONMAP); $ret->{state}=lc($ret->{state}) if defined $ret->{state}; return $ret }
attr DEVICE jsonMap color_temp:ct
attr DEVICE setList \
  on:noArg $\DEVICETOPIC/set {"brightness": BRIGHTNESS , "state":"ON", "color_temp": CTVALUE}\
  off:noArg $\DEVICETOPIC/set {"state":"OFF"}\
  brightness:colorpicker,BRI,0,5,255 $\DEVICETOPIC/set {"state":"on","$EVTPART0":"$EVTPART1"}\
  ct:colorpicker,CT,154,2,500 $\DEVICETOPIC/set {"color_temp":"$EVTPART1"}\
  warm:noArg $\DEVICETOPIC/set {"brightness": BRIGHTNESS , "color_temp": CTWARMVALUE}\
  white:noArg $\DEVICETOPIC/set {"brightness": BRIGHTNESS, "color_temp": CTWHITEVALUE}\
  rgb:colorpicker,RGB {"$\DEVICETOPIC/set ".zigbee2mqtt_RGB2JSON($EVTPART1)}
attr DEVICE userReadings rgb:color_y.* {Color::xyY2hex(ReadingsVal($name,'color_x',0),ReadingsVal($name,'color_y',0),ReadingsVal($name,'brightness',254))}
attr DEVICE comment The specified ct and brightness values in on and warm etc. commands ​​can be adjusted at any time via the setList attribute
set DEVICE attrTemplate speechcontrol_type_light_255
attr DEVICE model zigbee2mqtt_light_rgbcct_rgb
setreading DEVICE attrTemplateVersion 20221106

Beta-User

Bindestrich-Englisch gefällt mir immer noch nicht, den Rest habe ich jetzt "nebenbei" eingecheckt.
Server: HP-elitedesk@Debian 12, aktuelles FHEM@ConfigDB | CUL_HM (VCCU) | MQTT2: MiLight@ESP-GW, BT@OpenMQTTGw | MySensors: seriell, v.a. 2.3.1@RS485 | ZWave | ZigBee@deCONZ | SIGNALduino | MapleCUN | RHASSPY
svn: u.a MySensors, Weekday-&RandomTimer, Twilight,  div. attrTemplate-files

TomLee

das default bei brightness ist entgangen oder soll weiter da stehen ?

Beta-User

Server: HP-elitedesk@Debian 12, aktuelles FHEM@ConfigDB | CUL_HM (VCCU) | MQTT2: MiLight@ESP-GW, BT@OpenMQTTGw | MySensors: seriell, v.a. 2.3.1@RS485 | ZWave | ZigBee@deCONZ | SIGNALduino | MapleCUN | RHASSPY
svn: u.a MySensors, Weekday-&RandomTimer, Twilight,  div. attrTemplate-files

TomLee

Ich frag nur, wenn man drüber nachdenkt, könnte man es als default für "alle" weiteren Abfragen interpretieren, vlt. mal drüber schlafen !?

Beta-User

"Ups..." meinte: Übersehen, hab's direkt geändert. Besteht jetzt noch Handlungsbedarf bei diesem Template?
Server: HP-elitedesk@Debian 12, aktuelles FHEM@ConfigDB | CUL_HM (VCCU) | MQTT2: MiLight@ESP-GW, BT@OpenMQTTGw | MySensors: seriell, v.a. 2.3.1@RS485 | ZWave | ZigBee@deCONZ | SIGNALduino | MapleCUN | RHASSPY
svn: u.a MySensors, Weekday-&RandomTimer, Twilight,  div. attrTemplate-files

TomLee

#39
ZitatBesteht jetzt noch Handlungsbedarf bei diesem Template?

Bedingt. Funktional, mein ich nicht. Was meine Gedanken dazu betrifft, ja. Eilt was ? Nimmt das jemals ein Ende ? Es gib doch  noch mehrere Morgen an denen man aufwacht und es fällt einem was Neues ein (heute wars nach einem arbeitsreichen Tag, mit Händen und Füssen, nicht mit dem Kopf).


TomLee

Würdest du bitte bei Gelegenheit die HG08010 ergänzen ?

Wenn ich mir attrTemplate ? anschaue, geht mir durch den Kopf das kompakter umzusetzen/Zeilen zu sparen, darum mein Vorschlag die "Tested with" Geräte, mindestens drei in der Anzahl, in einer Zeile mit Komma und Leerzeichen getrennt anzugeben und bei grösser vier Geräte dann erst ein <br> ?

Zitat#source post: https://forum.fhem.de/index.php/topic,97303.msg905935.html#msg905935
name:zigbee2mqtt_light_rgbcct_rgb
filter:TYPE=MQTT2_DEVICE:FILTER=CID~zigbee.*
order:L_02e1
desc: <a href="https://forum.fhem.de/index.php/topic,97303.msg905935.html#msg905935" target="_blank">Forum Thread</a><br>A dimmable rgbw light connected via zigbee2mqtt<br>rgb value is encoded as HEX value<br>remove color_temp in setlist command <b>on</b> if default white is not desired<br>Tested with:<br><a href="https://www.zigbee2mqtt.io/devices/HG08008.html" target="_blank">Livarno Home LED ceiling light,&nbsp;</a><a href="https://www.zigbee2mqtt.io/devices/404000_404005_404012_404019.html#m%25C3%25BCller%2520licht-404000%252F404005%252F404012%252F404019" target="_blank">Mueller Light tint RGBW bulb,&nbsp;</a><a href="https://www.zigbee2mqtt.io/devices/HG08010.html" target="_blank">Livarno Home outdoor spotlight</a>
farewell:specified values ​​can be adjusted at any time in the setList attribute
par:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal('DEVICE','devicetopic',AttrVal('DEVICE','readingList','')) =~ m,[\b]?([^/:]+)[/].+, ? $1 : undef }
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal('DEVICE','devicetopic',AttrVal('DEVICE','readingList','')) =~ m,[^/]+[/]([^/:]+).*, ? $1 : undef }
par:BRIGHTNESS;brightness in <b>on</b>-command (numeric, 0-255, e.g. 120);undef
par:CTVALUE;ct (color temp) value in <b>on</b>-command (numeric, 0-370, e.g. 320);undef
par:CTWARMVALUE;ct value in <b>warm</b>-command (e.g. 320);undef
par:CTWHITEVALUE;ct value in <b>white</b>-command (e.g. 250);undef
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 devStateIcon {zigbee2mqtt_devStateIcon255($name)}
attr DEVICE webCmd toggle:on:off:brightness:ct:rgb
attr DEVICE devicetopic BASE_TOPIC/DEV_ID
attr DEVICE readingList $\DEVICETOPIC:.* { my $ret=json2nameValue($EVENT,'',$JSONMAP); $ret->{state}=lc($ret->{state}) if defined $ret->{state}; return $ret }
attr DEVICE jsonMap color_temp:ct
attr DEVICE setList \
  on:noArg $\DEVICETOPIC/set {"brightness": BRIGHTNESS , "state":"ON", "color_temp": CTVALUE}\
  off:noArg $\DEVICETOPIC/set {"state":"OFF"}\
  brightness:colorpicker,BRI,0,5,255 $\DEVICETOPIC/set {"state":"on","$EVTPART0":"$EVTPART1"}\
  ct:colorpicker,CT,154,2,500 $\DEVICETOPIC/set {"color_temp":"$EVTPART1"}\
  warm:noArg $\DEVICETOPIC/set {"brightness": BRIGHTNESS , "color_temp": CTWARMVALUE}\
  white:noArg $\DEVICETOPIC/set {"brightness": BRIGHTNESS, "color_temp": CTWHITEVALUE}\
  rgb:colorpicker,RGB {"$\DEVICETOPIC/set ".zigbee2mqtt_RGB2JSON($EVTPART1)}
attr DEVICE userReadings rgb:color_y.* {Color::xyY2hex(ReadingsVal($name,'color_x',0),ReadingsVal($name,'color_y',0),ReadingsVal($name,'brightness',254))}
attr DEVICE comment The specified ct and brightness values in on and warm etc. commands ​​can be adjusted at any time via the setList attribute
set DEVICE attrTemplate speechcontrol_type_light_255
attr DEVICE model zigbee2mqtt_light_rgbcct_rgb
setreading DEVICE attrTemplateVersion 202211xx

Und par:BRIGHTNESS;brightness in <b>on</b>-command (numeric, 0-255, e.g. 120);undef ist mir noch zu wenig beschrieben, BRIGHTNESS wird ja in allen "spezifizierten" Befehlen in dem Device übergeben, hab aber auch keine kurze Lösung dazu, vlt. so in der Art:
par:BRIGHTNESS;brightness in <b>all</b> specific commands (numeric, 0-255, e.g. 120);undef

Vlt. hast du da ja eine Idee ?

TomLee

#41
Es hat sich bei mir der Bedarf ergeben das zwei Leuchten nach Spannungsausfall / Spannungszufuhr im Aus-Zustand sein sollen.
Hab ich mal so in diesem Template festgehalten, Name hab ich nicht geändert (spart man sich das jsonMap) und bei power_on_behavior belassen (hoffe hab nix übersehen/falsch gemacht):

https://www.zigbee2mqtt.io/devices/404006_404008_404004.html#power-on-behavior-enum

Zitat#source post: https://forum.fhem.de/index.php/topic,97303.msg905935.html#msg905935
name:zigbee2mqtt_light_rgbcct_rgb
filter:TYPE=MQTT2_DEVICE:FILTER=CID~zigbee.*
order:L_02e1
desc: <a href="https://forum.fhem.de/index.php/topic,97303.msg905935.html#msg905935" target="_blank">Forum Thread</a><br>A dimmable rgbw light connected via zigbee2mqtt<br>rgb value is encoded as HEX value<br>remove color_temp in setlist command <b>on</b> if default white is not desired<br>Tested with:<br><a href="https://www.zigbee2mqtt.io/devices/HG08008.html" target="_blank">Livarno Home LED ceiling light,&nbsp;</a><a href="https://www.zigbee2mqtt.io/devices/404000_404005_404012_404019.html#m%25C3%25BCller%2520licht-404000%252F404005%252F404012%252F404019" target="_blank">Mueller Light tint RGBW bulb,&nbsp;</a><a href="https://www.zigbee2mqtt.io/devices/HG08010.html" target="_blank">Livarno Home outdoor spotlight</a>
farewell:specified values ​​can be adjusted at any time in the setList attribute
par:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal('DEVICE','devicetopic',AttrVal('DEVICE','readingList','')) =~ m,[\b]?([^/:]+)[/].+, ? $1 : undef }
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal('DEVICE','devicetopic',AttrVal('DEVICE','readingList','')) =~ m,[^/]+[/]([^/:]+).*, ? $1 : undef }
par:BRIGHTNESS;brightness in <b>all</b> specific commands (numeric, 0-255, e.g. 120);undef
par:CTVALUE;ct (color temp) value in <b>on</b>-command (numeric, 0-370, e.g. 320);undef
par:CTWARMVALUE;ct value in <b>warm</b>-command (e.g. 320);undef
par:CTWHITEVALUE;ct value in <b>white</b>-command (e.g. 250);undef
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 devStateIcon {zigbee2mqtt_devStateIcon255($name)}
attr DEVICE webCmd toggle:on:off:brightness:ct:rgb
attr DEVICE devicetopic BASE_TOPIC/DEV_ID
attr DEVICE getList power_on_behavior:noArg power_on_behavior $\DEVICETOPIC/get {"power_on_behavior": ""}
attr DEVICE readingList $\DEVICETOPIC:.* { my $ret=json2nameValue($EVENT,'',$JSONMAP); $ret->{state}=lc($ret->{state}) if defined $ret->{state}; return $ret }
attr DEVICE jsonMap color_temp:ct
attr DEVICE setList \
  on:noArg $\DEVICETOPIC/set {"brightness": BRIGHTNESS , "state":"ON", "color_temp": CTVALUE}\
  off:noArg $\DEVICETOPIC/set {"state":"OFF"}\
  brightness:colorpicker,BRI,0,5,255 $\DEVICETOPIC/set {"state":"on","$EVTPART0":"$EVTPART1"}\
  ct:colorpicker,CT,154,2,500 $\DEVICETOPIC/set {"color_temp":"$EVTPART1"}\
  warm:noArg $\DEVICETOPIC/set {"brightness": BRIGHTNESS , "color_temp": CTWARMVALUE}\
  white:noArg $\DEVICETOPIC/set {"brightness": BRIGHTNESS, "color_temp": CTWHITEVALUE}\
  rgb:colorpicker,RGB {"$\DEVICETOPIC/set ".zigbee2mqtt_RGB2JSON($EVTPART1)}\
  power_on_behavior:on,off $\DEVICETOPIC/set {"power_on_behavior": "$EVTPART1"}
attr DEVICE userReadings rgb:color_y.* {Color::xyY2hex(ReadingsVal($name,'color_x',0),ReadingsVal($name,'color_y',0),ReadingsVal($name,'brightness',254))}
attr DEVICE comment The specified ct and brightness values in on and warm etc. commands ​​can be adjusted at any time via the setList attribute
set DEVICE attrTemplate speechcontrol_type_light_254
attr DEVICE model zigbee2mqtt_light_rgbcct_rgb
setreading DEVICE attrTemplateVersion 20230110


11:42:25.357

SENT

zigbee2mqtt/0x00158d0003274a6c/get

{"power_on_behavior": ""}

11:42:25.441

mqttjs_175455c0

zigbee2mqtt/0x00158d0003274a6c

{"brightness":120,"color_mode":"color_temp","color_temp":320,"color_temp_startup":370,"linkquality":95,"power_on_behavior":"off","state":"OFF"}
11:42:35.345

SENT

zigbee2mqtt/0x00158d0003274a6c/set

{"power_on_behavior": "off"}

11:42:35.428

mqttjs_175455c0

zigbee2mqtt/0x00158d0003274a6c

{"brightness":120,"color_mode":"color_temp","color_temp":320,"color_temp_startup":370,"linkquality":103,"power_on_behavior":"off","state":"OFF"}
11:42:40.061

SENT

zigbee2mqtt/0x00158d0003274a6c/set

{"power_on_behavior": "on"}

11:42:40.145

mqttjs_175455c0

zigbee2mqtt/0x00158d0003274a6c

{"brightness":120,"color_mode":"color_temp","color_temp":320,"color_temp_startup":370,"linkquality":103,"power_on_behavior":"on","state":"OFF"}


Beispieldevice:

defmod MQTT2_zigbee_gu10_1 MQTT2_DEVICE zigbee_0x00158d0003274a6c
attr MQTT2_zigbee_gu10_1 userattr irgendwas irgendwas_map lightSceneParamsToSave lightSceneRestoreOnlyIfChanged:1,0 structexclude wzdl wzdl_map
attr MQTT2_zigbee_gu10_1 IODev MQTT2_Server
attr MQTT2_zigbee_gu10_1 alexaName decke1
attr MQTT2_zigbee_gu10_1 comment The specified ct and brightness values in on and warm etc. commands ​​can be adjusted at any time via the setList attribute
attr MQTT2_zigbee_gu10_1 devStateIcon {zigbee2mqtt_devStateIcon255($name)}
attr MQTT2_zigbee_gu10_1 devicetopic zigbee2mqtt/0x00158d0003274a6c
attr MQTT2_zigbee_gu10_1 event-on-change-reading state,pct,ct
attr MQTT2_zigbee_gu10_1 genericDeviceType light
attr MQTT2_zigbee_gu10_1 getList power_on_behavior:noArg power_on_behavior $DEVICETOPIC/get {"power_on_behavior": ""}
attr MQTT2_zigbee_gu10_1 group Wohnzimmer
attr MQTT2_zigbee_gu10_1 homebridgeMapping Brightness=brightness::brightness,maxValue=100,max=100,factor=0.39371,delay=true
attr MQTT2_zigbee_gu10_1 icon light_control
attr MQTT2_zigbee_gu10_1 imageLink /fhem/deviceimages/mqtt2/404006-404008-404004.jpg
attr MQTT2_zigbee_gu10_1 jsonMap color_temp:ct
attr MQTT2_zigbee_gu10_1 model zigbee2mqtt_light_rgbcct_rgb
attr MQTT2_zigbee_gu10_1 readingList $DEVICETOPIC:.* { my $ret=json2nameValue($EVENT,'',$JSONMAP);; $ret->{state}=lc($ret->{state}) if defined $ret->{state};; return $ret }
attr MQTT2_zigbee_gu10_1 room MQTT2_DEVICE,Privat->OG->Wohnzimmer
attr MQTT2_zigbee_gu10_1 setList on:noArg $DEVICETOPIC/set {"brightness": 120 , "state":"ON", "color_temp": 320}\
  off:noArg $DEVICETOPIC/set {"state":"OFF"}\
  brightness:colorpicker,BRI,0,5,255 $DEVICETOPIC/set {"state":"on","$EVTPART0":"$EVTPART1"}\
  ct:colorpicker,CT,154,2,500 $DEVICETOPIC/set {"color_temp":"$EVTPART1"}\
  warm:noArg $DEVICETOPIC/set {"brightness": 120 , "color_temp": 320}\
  white:noArg $DEVICETOPIC/set {"brightness": 120, "color_temp": 250}\
  rgb:colorpicker,RGB {"$DEVICETOPIC/set ".zigbee2mqtt_RGB2JSON($EVTPART1)}\
  power_on_behavior:on,off $DEVICETOPIC/set {"power_on_behavior": "$EVTPART1"}
attr MQTT2_zigbee_gu10_1 setStateList on off
attr MQTT2_zigbee_gu10_1 userReadings rgb:color_y.* {Color::xyY2hex(ReadingsVal($name,'color_x',0),ReadingsVal($name,'color_y',0),ReadingsVal($name,'brightness',254))}
attr MQTT2_zigbee_gu10_1 verbose 2
attr MQTT2_zigbee_gu10_1 webCmd toggle:on:off:brightness:ct:rgb
attr MQTT2_zigbee_gu10_1 webCmdLabel Helligkeit\
:

setstate MQTT2_zigbee_gu10_1 off
setstate MQTT2_zigbee_gu10_1 2023-03-10 11:35:40 attrTemplateVersion 20221201
setstate MQTT2_zigbee_gu10_1 2023-03-10 11:42:40 brightness 120
setstate MQTT2_zigbee_gu10_1 2023-03-10 11:42:40 color_mode color_temp
setstate MQTT2_zigbee_gu10_1 2023-03-10 11:42:40 color_temp_startup 370
setstate MQTT2_zigbee_gu10_1 2023-03-10 11:42:40 ct 320
setstate MQTT2_zigbee_gu10_1 2023-03-10 11:42:40 linkquality 103
setstate MQTT2_zigbee_gu10_1 2023-03-10 11:42:40 power_on_behavior on
setstate MQTT2_zigbee_gu10_1 2023-03-10 11:42:40 state off

Beta-User

Danke für die Anregung, ist seit gestern im template drin.
Server: HP-elitedesk@Debian 12, aktuelles FHEM@ConfigDB | CUL_HM (VCCU) | MQTT2: MiLight@ESP-GW, BT@OpenMQTTGw | MySensors: seriell, v.a. 2.3.1@RS485 | ZWave | ZigBee@deCONZ | SIGNALduino | MapleCUN | RHASSPY
svn: u.a MySensors, Weekday-&RandomTimer, Twilight,  div. attrTemplate-files

TomLee

Vlt. sollte man alle möglichen Werte berücksichtigen ::)

Zitatpower_on_behavior:on,off,toggle,previous $DEVICETOPIC/set {"power_on_behavior": "$EVTPART1"}