mqtt2.template: ct update for zigbee2mqtt, small changes to ems-esp

git-svn-id: https://svn.fhem.de/fhem/trunk@25090 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
Beta-User 2021-10-18 17:27:22 +00:00
parent c13e47c3df
commit 3ddb6d3adc

View File

@ -231,17 +231,19 @@ par:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal("DEVICE","devicetopic",AttrVal("DEVICE","readingList","")) =~ m,[^/]+[/]([^/:]+).*, ? $1 : undef }
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 webCmd toggle:on:off:brightness:ct
attr DEVICE devicetopic BASE_TOPIC/DEV_ID
attr DEVICE readingList $\DEVICETOPIC:.* { json2nameValue($EVENT) }
attr DEVICE readingList $\DEVICETOPIC:.* { json2nameValue($EVENT,'',$JSONMAP) }
attr DEVICE setList \
on:noArg $\DEVICETOPIC/set {"state":"ON"}\
off:noArg $\DEVICETOPIC/set {"state":"OFF"}\
brightness:colorpicker,BRI,0,5,255 $\DEVICETOPIC/set {"state":"on","$EVTPART0":"$EVTPART1"}\
color_temp:colorpicker,CT,154,2,500 $\DEVICETOPIC/set {"$EVTPART0":"$EVTPART1"}
ct:colorpicker,CT,154,2,500 $\DEVICETOPIC/set {"color_temp":"$EVTPART1"}\
ct_startup:coolest,cool,neutral,warmest,previous $DEVICETOPIC/set {"color_temp_startup":"$EVTPART1"}
attr DEVICE jsonMap color_temp:ct color_temp_startup:ct_startup
set DEVICE attrTemplate speechcontrol_type_light_255
attr DEVICE model zigbee2mqtt_light_cct
setreading DEVICE attrTemplateVersion 20200904
setreading DEVICE attrTemplateVersion 20211018
#source post: https://forum.fhem.de/index.php/topic,97303.msg905935.html#msg905935
name:zigbee2mqtt_light_rgb_hex
@ -300,21 +302,22 @@ par:ICON;ICON as set, defaults to hue_filled_white_and_color_e27_b22;{ AttrVal("
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
attr DEVICE webCmd toggle:on:off:brightness:ct:warm:white:hex
attr DEVICE devicetopic BASE_TOPIC/DEV_ID
attr DEVICE readingList $\DEVICETOPIC:.* { json2nameValue($EVENT) }
attr DEVICE readingList $\DEVICETOPIC:.* { json2nameValue($EVENT,'',$JSONMAP) }
attr DEVICE setList \
on:noArg $\DEVICETOPIC/set {"state":"ON"}\
off:noArg $\DEVICETOPIC/set {"state":"OFF"}\
warm:noArg $\DEVICETOPIC/set {"brightness": 200 , "color_temp": 360}\
white:noArg $\DEVICETOPIC/set {"brightness": 254, "color_temp": 250}\
color_temp:colorpicker,CT,250,1,454 $\DEVICETOPIC/set {"$EVTPART0":"$EVTPART1"}\
ct:colorpicker,CT,250,1,454 $\DEVICETOPIC/set {"color_temp":"$EVTPART1"}\
brightness:colorpicker,BRI,0,5,255 $\DEVICETOPIC/set {"state":"on","$EVTPART0":"$EVTPART1"}\
hex:colorpicker,HEX,0,15,255 $\DEVICETOPIC/set {"color":{"$EVTPART0":"#$EVTPART1"}}
attr DEVICE userReadings hex:color_y.* {Color::xyY2hex(ReadingsVal($name,"color_x",0),ReadingsVal($name,"color_y",0),ReadingsVal($name,"brightness",254))}
attr DEVICE userReadings hex:color_y.* {Color::xyY2hex(ReadingsVal($name,"color_x",0),ReadingsVal($name,"color_y",0),ReadingsVal($name,"brightness",254))}
attr DEVICE jsonMap color_temp:ct
set DEVICE attrTemplate speechcontrol_type_light_255
attr DEVICE model zigbee2mqtt_light_rgbw_hex
setreading DEVICE attrTemplateVersion 20200904
setreading DEVICE attrTemplateVersion 20211018
#source post: https://forum.fhem.de/index.php/topic,97303.msg905935.html#msg905935
name:zigbee2mqtt_light_rgbw_rgb
@ -351,18 +354,19 @@ par:ICON;ICON as set, defaults to hue_filled_white_and_color_e27_b22;{ AttrVal("
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
attr DEVICE webCmd toggle:on:off:brightness:ct:hex
attr DEVICE devicetopic BASE_TOPIC/DEV_ID
attr DEVICE readingList $\DEVICETOPIC:.* { json2nameValue($EVENT) }
attr DEVICE readingList $\DEVICETOPIC:.* { json2nameValue($EVENT,'',$JSONMAP) }
attr DEVICE setList \
on:noArg $\DEVICETOPIC/set {"state":"ON"}\
off:noArg $\DEVICETOPIC/set {"state":"OFF"}\
brightness:colorpicker,BRI,0,5,255 $\DEVICETOPIC/set {"state":"on","$EVTPART0":"$EVTPART1"}\
color_temp:colorpicker,CT,154,2,500 $\DEVICETOPIC/set {"$EVTPART0":"$EVTPART1"}\
ct:colorpicker,CT,154,2,500 $\DEVICETOPIC/set {"color_temp":"$EVTPART1"}\
hex:colorpicker,HEX,0,15,255 $\DEVICETOPIC/set {"color":{"$EVTPART0":"#$EVTPART1"}}
set DEVICE attrTemplate speechcontrol_type_light_255
attr DEVICE jsonMap color_temp:ct
attr DEVICE model zigbee2mqtt_light_rgbcct_hex
setreading DEVICE attrTemplateVersion 20200904
setreading DEVICE attrTemplateVersion 20211018
#source post: https://forum.fhem.de/index.php/topic,97303.msg905935.html#msg905935
name:zigbee2mqtt_light_rgbcct_rgb
@ -375,18 +379,18 @@ par:ICON;ICON as set, defaults to hue_filled_white_and_color_e27_b22;{ AttrVal("
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
attr DEVICE webCmd toggle:on:off:brightness:ct:color
attr DEVICE devicetopic BASE_TOPIC/DEV_ID
attr DEVICE readingList $\DEVICETOPIC:.* { json2nameValue($EVENT) }
attr DEVICE readingList $\DEVICETOPIC:.* { json2nameValue($EVENT,'',$JSONMAP) }
attr DEVICE setList \
on:noArg $\DEVICETOPIC/set {"state":"ON"}\
off:noArg $\DEVICETOPIC/set {"state":"OFF"}\
brightness:colorpicker,BRI,0,5,255 $\DEVICETOPIC/set {"state":"on","$EVTPART0":"$EVTPART1"}\
color_temp:colorpicker,CT,154,2,500 $\DEVICETOPIC/set {"$EVTPART0":"$EVTPART1"}\
ct:colorpicker,CT,154,2,500 $\DEVICETOPIC/set {"color_temp":"$EVTPART1"}\
color:colorpicker,RGB {"$\DEVICETOPIC/set ".zigbee2mqtt_RGB2JSON($EVTPART1)}
set DEVICE attrTemplate speechcontrol_type_light_255
attr DEVICE model zigbee2mqtt_light_rgbcct_rgb
setreading DEVICE attrTemplateVersion 20200904
setreading DEVICE attrTemplateVersion 20211018
name:zigbee2mqtt_smokeDetector
filter:TYPE=MQTT2_DEVICE:FILTER=CID~zigbee.*
@ -3595,9 +3599,10 @@ attr DEVICE stateFormat \
Status-Code: serviceCode serviceCodeNumber\
Temp Außen: outdoorTemp C\
attr DEVICE devStateIcon idle:sani_heating heating:sani_heating@red tapwater:sani_water_hot@red
attr DEVICE userReadings BoilerStatus {BoilerStatus('serviceCode','serviceCodeNumber')}
attr DEVICE userReadings BoilerStatus:serviceCode.* {BoilerStatus(ReadingsVal($name,'serviceCode',''),ReadingsVal($name,'serviceCodeNumber',''))}
attr DEVICE comment userReadings need additional code, see https://forum.fhem.de/index.php/topic,104968.msg1180136.html#msg1180136
attr DEVICE model ems-esp_boiler
setreading DEVICE attrTemplateVersion 20211016
setreading DEVICE attrTemplateVersion 20211017
#ems-esp thermostat device
name:ems-esp_thermostat_read-only