@@ -88,7 +88,7 @@ const romasku = {
8888 name,
8989 endpointName,
9090 access : "STATE_GET" ,
91- lookup : { released : 0 , press : 1 , long_press : 2 , position_on : 3 , position_off : 4 } ,
91+ lookup : { released : 0 , single_press : 1 , long_press : 2 , position_on : 3 , position_off : 4 , double_press : 5 , single_release : 6 } ,
9292 cluster : "genMultistateInput" ,
9393 attribute : "presentValue" ,
9494 description : "Action of the switch: 'released' or 'press' or 'long_press'" ,
@@ -124,6 +124,50 @@ const romasku = {
124124 description : "State of the network indicator LED" ,
125125 access : "ALL" ,
126126 } ) ,
127+ nextScene :( name , endpointName ) =>
128+ numeric ( {
129+ name,
130+ endpointNames : [ endpointName ] ,
131+ cluster : "genOnOffSwitchCfg" ,
132+ attribute : { ID : 0xff06 , type : 0x20 } , // uint8
133+ description : "Next scene to be recalled" ,
134+ valueMin : 0 ,
135+ valueMax : 255 ,
136+ } ) ,
137+ sceneCount : ( name , endpointName ) =>
138+ numeric ( {
139+ name,
140+ endpointNames : [ endpointName ] ,
141+ cluster : "genOnOffSwitchCfg" ,
142+ attribute : { ID : 0xff07 , type : 0x20 } , // uint8
143+ description : "Number of scenes to iterate through" ,
144+ valueMin : 0 ,
145+ valueMax : 255 ,
146+ } ) ,
147+ sceneOffset : ( name , endpointName ) =>
148+ numeric ( {
149+ name,
150+ endpointNames : [ endpointName ] ,
151+ cluster : "genOnOffSwitchCfg" ,
152+ attribute : { ID : 0xff08 , type : 0x20 } , // uint8
153+ description : "Offset of the first scene" ,
154+ } ) ,
155+ sceneGroupId : ( name , endpointName ) =>
156+ numeric ( {
157+ name,
158+ endpointNames : [ endpointName ] ,
159+ cluster : "genOnOffSwitchCfg" ,
160+ attribute : { ID : 0xff09 , type : 0x21 } , // uint16
161+ description : "Scene cluster for scene recall commands. 0xffff means infer from bindings" ,
162+ } ) ,
163+ sceneRecallTime : ( name , endpointName ) =>
164+ numeric ( {
165+ name,
166+ endpointNames : [ endpointName ] ,
167+ cluster : "genOnOffSwitchCfg" ,
168+ attribute : { ID : 0xff0a , type : 0x21 } , // uint16
169+ description : "Recall time for the scene recall commands. 0xffff is default." ,
170+ } ) ,
127171 deviceConfig : ( name , endpointName ) =>
128172 text ( {
129173 name,
@@ -1857,6 +1901,11 @@ const definitions = [
18571901 romasku . bindedMode ( "switch_left_binded_mode" , "switch_left" ) ,
18581902 romasku . longPressDuration ( "switch_left_long_press_duration" , "switch_left" ) ,
18591903 romasku . levelMoveRate ( "switch_left_level_move_rate" , "switch_left" ) ,
1904+ romasku . nextScene ( "switch_left_next_scene" , "switch_left" ) ,
1905+ romasku . sceneCount ( "switch_left_scene_count" , "switch_left" ) ,
1906+ romasku . sceneOffset ( "switch_left_scene_offset" , "switch_left" ) ,
1907+ romasku . sceneGroupId ( "switch_left_scene_group_id" , "switch_left" ) ,
1908+ romasku . sceneRecallTime ( "switch_left_scene_recall_time" , "switch_left" ) ,
18601909 romasku . pressAction ( "switch_right_press_action" , "switch_right" ) ,
18611910 romasku . switchMode ( "switch_right_mode" , "switch_right" ) ,
18621911 romasku . switchAction ( "switch_right_action_mode" , "switch_right" ) ,
@@ -1865,6 +1914,11 @@ const definitions = [
18651914 romasku . bindedMode ( "switch_right_binded_mode" , "switch_right" ) ,
18661915 romasku . longPressDuration ( "switch_right_long_press_duration" , "switch_right" ) ,
18671916 romasku . levelMoveRate ( "switch_right_level_move_rate" , "switch_right" ) ,
1917+ romasku . nextScene ( "switch_right_next_scene" , "switch_right" ) ,
1918+ romasku . sceneCount ( "switch_right_scene_count" , "switch_right" ) ,
1919+ romasku . sceneOffset ( "switch_right_scene_offset" , "switch_right" ) ,
1920+ romasku . sceneGroupId ( "switch_right_scene_group_id" , "switch_right" ) ,
1921+ romasku . sceneRecallTime ( "switch_right_scene_recall_time" , "switch_right" ) ,
18681922 ] ,
18691923 meta : { multiEndpoint : true } ,
18701924 configure : async ( device , coordinatorEndpoint , logger ) => {
0 commit comments