I set up the flow to switch scenes based on “input select” entity in home-assistant, it basically checks the current setting of input select and turn_on scene based on the current value, then select next in input_select to switch to the next scene.
However I noticed that it does not work smooth. When I select the scene quickly it does not switch it while node red shows that the scene is tuned on.
Here is the image showing that scenes are getting activated while my state of lights do not always change. It takes several button presses sometimes before the actual change of the scene.
And my flow which has a bit more automations in it
[{"id":"4cb2d8d4.f1ff18","type":"tab","label":"living_room","disabled":false,"info":""},{"id":"cfeb8db3.53c14","type":"server-events","z":"4cb2d8d4.f1ff18","name":"event","server":"10991ca8.1f1c03","version":1,"event_type":"deconz_event","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"waitForRunning":true,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"$outputData(\"eventData\").event_type","valueType":"jsonata"},{"property":"event_type","propertyType":"msg","value":"$outputData(\"eventData\").event_type","valueType":"jsonata"}],"x":110,"y":160,"wires":[["425b6f10.008f3"]]},{"id":"425b6f10.008f3","type":"switch","z":"4cb2d8d4.f1ff18","name":"get_device_id","property":"payload.event.unique_id","propertyType":"msg","rules":[{"t":"eq","v":"00:17:88:01:06:05:c1:f2","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":280,"y":160,"wires":[["2b31e17a.901bfe"]]},{"id":"2b31e17a.901bfe","type":"switch","z":"4cb2d8d4.f1ff18","name":"event_type","property":"payload.event.event","propertyType":"msg","rules":[{"t":"eq","v":"1001","vt":"str"},{"t":"eq","v":"1002","vt":"str"},{"t":"eq","v":"1003","vt":"str"},{"t":"eq","v":"1004","vt":"str"}],"checkall":"true","repair":false,"outputs":4,"x":470,"y":160,"wires":[["fd750856.f7f64"],["c9b4bd65.7776e8"],["5434c17c.c69228"],[]]},{"id":"c9b4bd65.7776e8","type":"api-current-state","z":"4cb2d8d4.f1ff18","name":"check_timer","server":"10991ca8.1f1c03","version":3,"outputs":2,"halt_if":"active","halt_if_type":"str","halt_if_compare":"is","entity_id":"timer.living_room_switch_timer","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":670,"y":140,"wires":[["4617b194.abe3a8","7f57714e.ee038"],["7f57714e.ee038","307f595fce60e83c"]]},{"id":"7f57714e.ee038","type":"api-call-service","z":"4cb2d8d4.f1ff18","name":"restart_timer","server":"10991ca8.1f1c03","version":5,"debugenabled":false,"domain":"timer","service":"start","areaId":[],"deviceId":[],"entityId":["timer.living_room_switch_timer"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","output_location":"","output_location_type":"none","x":910,"y":138,"wires":[[]]},{"id":"51e9c79c.e1fb4","type":"link in","z":"4cb2d8d4.f1ff18","name":"toggle_scenes","links":["4617b194.abe3a8"],"x":75,"y":520,"wires":[["f511d989.bb014"]]},{"id":"4617b194.abe3a8","type":"link out","z":"4cb2d8d4.f1ff18","name":"toggle_scenes","links":["51e9c79c.e1fb4"],"x":855,"y":98,"wires":[]},{"id":"d494dea5.d271d8","type":"api-call-service","z":"4cb2d8d4.f1ff18","name":"max","server":"10991ca8.1f1c03","version":5,"debugenabled":false,"domain":"scene","service":"turn_on","areaId":[],"deviceId":[],"entityId":["scene.living_room_all_max"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","output_location":"","output_location_type":"none","x":550,"y":580,"wires":[["b15c5603.4c50a"]]},{"id":"98b4635f.5ecf7","type":"api-call-service","z":"4cb2d8d4.f1ff18","name":"dimmed","server":"10991ca8.1f1c03","version":5,"debugenabled":false,"domain":"scene","service":"turn_on","areaId":[],"deviceId":[],"entityId":["scene.living_room_all_dimmed"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","output_location":"","output_location_type":"none","x":560,"y":520,"wires":[["b15c5603.4c50a"]]},{"id":"f511d989.bb014","type":"api-current-state","z":"4cb2d8d4.f1ff18","name":"scene_selected","server":"10991ca8.1f1c03","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_select.living_room_scenes","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":200,"y":520,"wires":[["887e2a2a.721e88"]]},{"id":"887e2a2a.721e88","type":"switch","z":"4cb2d8d4.f1ff18","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"stand_lamp_only","vt":"str"},{"t":"eq","v":"dimmed","vt":"str"},{"t":"eq","v":"max","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"x":370,"y":520,"wires":[["27063e72.6abbfa"],["98b4635f.5ecf7"],["d494dea5.d271d8"]]},{"id":"27063e72.6abbfa","type":"api-call-service","z":"4cb2d8d4.f1ff18","name":"table_lamp_only","server":"10991ca8.1f1c03","version":5,"debugenabled":false,"domain":"scene","service":"turn_on","areaId":[],"deviceId":[],"entityId":["scene.living_room_table_lamp_only"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","output_location":"","output_location_type":"none","x":580,"y":460,"wires":[["b15c5603.4c50a"]]},{"id":"b15c5603.4c50a","type":"api-call-service","z":"4cb2d8d4.f1ff18","name":"input_select_next","server":"10991ca8.1f1c03","version":5,"debugenabled":false,"domain":"input_select","service":"select_next","areaId":[],"deviceId":[],"entityId":["input_select.living_room_scenes"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","output_location":"","output_location_type":"none","x":830,"y":520,"wires":[[]]},{"id":"56232653.5918d","type":"function","z":"4cb2d8d4.f1ff18","name":"brightness_up","func":"'var bright_pct = flow.get(\"bright_pct\");'\nvar new_msg = {};\nvar bright_pct = msg.data.attributes.brightness;\n\nif(bright_pct > 254){\n bright_pct = 255\n}\nelse{\n bright_pct = (bright_pct + 30);\n}\n\n\n\n\nflow.set('bright_pct', bright_pct);\nnew_msg = {\"payload\": {\"data\" : {\"brightness\" : Number(bright_pct)}}};\nreturn new_msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":760,"y":700,"wires":[["ec1b742e.48b47"]]},{"id":"3a35850e.2009b2","type":"link in","z":"4cb2d8d4.f1ff18","name":"dim","links":["fd750856.f7f64"],"x":75,"y":740,"wires":[["b04e95a8.04cd78"]]},{"id":"fd750856.f7f64","type":"link out","z":"4cb2d8d4.f1ff18","name":"dim","links":["3a35850e.2009b2"],"x":615,"y":80,"wires":[]},{"id":"ec1b742e.48b47","type":"api-call-service","z":"4cb2d8d4.f1ff18","name":"","server":"10991ca8.1f1c03","version":5,"debugenabled":false,"domain":"light","service":"turn_on","areaId":[],"deviceId":[],"entityId":["light.living_room"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","output_location":"","output_location_type":"none","x":970,"y":740,"wires":[[]]},{"id":"763f78ed.ace38","type":"function","z":"4cb2d8d4.f1ff18","name":"brightness_down","func":"'var bright_pct = flow.get(\"bright_pct\");'\nvar new_msg = {};\nvar bright_pct = msg.data.attributes.brightness;\n\nif (bright_pct > 0){\n bright_pct = bright_pct - 30;\n}\nelse {\n bright_pct = 0\n}\n\n\nflow.set('bright_pct', bright_pct);\nnew_msg = {\"payload\": {\"data\" : {\"brightness\" : Number(bright_pct)}}};\nreturn new_msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":770,"y":780,"wires":[["ec1b742e.48b47"]]},{"id":"b04e95a8.04cd78","type":"api-current-state","z":"4cb2d8d4.f1ff18","name":"check_dim_switch","server":"10991ca8.1f1c03","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.living_room_dimming_up","state_type":"habool","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":210,"y":740,"wires":[["e885e47b.c75148"]]},{"id":"5434c17c.c69228","type":"api-call-service","z":"4cb2d8d4.f1ff18","name":"toggle_dimming","server":"10991ca8.1f1c03","version":5,"debugenabled":false,"domain":"input_boolean","service":"toggle","areaId":[],"deviceId":[],"entityId":["input_boolean.living_room_dimming_up"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","output_location":"","output_location_type":"none","x":680,"y":200,"wires":[[]]},{"id":"e885e47b.c75148","type":"switch","z":"4cb2d8d4.f1ff18","name":"","property":"payload","propertyType":"msg","rules":[{"t":"true"},{"t":"false"}],"checkall":"true","repair":false,"outputs":2,"x":390,"y":740,"wires":[["d6551564.9d24"],["b05509cc.bd6b08"]]},{"id":"d6551564.9d24","type":"api-current-state","z":"4cb2d8d4.f1ff18","name":"living_room","server":"10991ca8.1f1c03","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"light.living_room","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":570,"y":700,"wires":[["56232653.5918d"]]},{"id":"b05509cc.bd6b08","type":"api-current-state","z":"4cb2d8d4.f1ff18","name":"living_room","server":"10991ca8.1f1c03","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"light.living_room","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":570,"y":780,"wires":[["763f78ed.ace38"]]},{"id":"e8b86bd4.b806a","type":"api-call-service","z":"4cb2d8d4.f1ff18","name":"lights_off","server":"10991ca8.1f1c03","version":5,"debugenabled":true,"domain":"light","service":"turn_off","areaId":[],"deviceId":[],"entityId":["light.living_room"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","output_location":"","output_location_type":"none","x":650,"y":300,"wires":[["72ce81caabb9c39c"]]},{"id":"53ca1e5af8c153b1","type":"api-current-state","z":"4cb2d8d4.f1ff18","name":"","server":"10991ca8.1f1c03","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"light.living_room","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":300,"y":340,"wires":[["83a68f403ee729ba"]]},{"id":"83a68f403ee729ba","type":"switch","z":"4cb2d8d4.f1ff18","name":"","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"on","vt":"str"},{"t":"cont","v":"off","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":500,"y":340,"wires":[["e8b86bd4.b806a"],["0da9754ee0fabe9c"]]},{"id":"0da9754ee0fabe9c","type":"api-call-service","z":"4cb2d8d4.f1ff18","name":"table_lamp_only","server":"10991ca8.1f1c03","version":5,"debugenabled":false,"domain":"scene","service":"turn_on","areaId":[],"deviceId":[],"entityId":["scene.living_room_table_lamp_only"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","output_location":"","output_location_type":"none","x":670,"y":360,"wires":[[]]},{"id":"c2d71b6cdc2712e0","type":"link in","z":"4cb2d8d4.f1ff18","name":"","links":["307f595fce60e83c"],"x":75,"y":340,"wires":[["53ca1e5af8c153b1"]]},{"id":"307f595fce60e83c","type":"link out","z":"4cb2d8d4.f1ff18","name":"","mode":"link","links":["c2d71b6cdc2712e0"],"x":855,"y":200,"wires":[]},{"id":"72ce81caabb9c39c","type":"api-call-service","z":"4cb2d8d4.f1ff18","name":"stop_timer","server":"10991ca8.1f1c03","version":5,"debugenabled":false,"domain":"timer","service":"finish","areaId":[],"deviceId":[],"entityId":["timer.living_room_switch_timer"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","output_location":"","output_location_type":"none","x":930,"y":300,"wires":[[]]},{"id":"10991ca8.1f1c03","type":"server","name":"Home Assistant","version":2,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30}]
Do you have any idea on what could cause an issue? Something to do with transition or command lagging?