I am trying to use a change node to take a light strip effect and translate it to a number that the strip understands.
So the effect “Rainbow” should send a 10 along the flow.
The effect “Rainbow_aurora” should send a 45.
Issue is when I choose “rainbow_aurora”, it translates that to 10_aurora.
Is there anyway to get the change node to match the entire phrase? (Other than changing it to 1 word, RainbowAurora)
[{"id":"7f36d3a2.d1a03c","type":"tab","label":"Flow 2","disabled":false,"info":""},{"id":"2eb30c2f.a21954","type":"function","z":"7f36d3a2.d1a03c","name":"Calculate pixel effect","func":"var pixelEffect = msg.payload;\nvar brightness = msg.brightness;\n\n\nmsg.value = {};\nmsg.value = ((brightness * 256) + pixelEffect);\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":838,"y":234,"wires":[["a3a9d9b3.fa9b88","c92d757.9b09388"]]},{"id":"54d5ca0b.4ba4c4","type":"api-current-state","z":"7f36d3a2.d1a03c","name":"Check brightness setting","server":"ab3e2c53.e3491","version":1,"outputs":1,"halt_if":"","halt_if_type":"num","halt_if_compare":"is","override_topic":false,"entity_id":"input_number.light_strip_effect_brightness","state_type":"num","state_location":"brightness","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":605,"y":234,"wires":[["2eb30c2f.a21954"]]},{"id":"a3a9d9b3.fa9b88","type":"api-call-service","z":"7f36d3a2.d1a03c","name":"Set Pixel Effect","server":"497693ef.d5e6bc","version":1,"debugenabled":false,"service_domain":"ozw","service":"set_config_parameter","entityId":"","data":"{\t \"node_id\":57,\t \"parameter\":31,\t \"value\":{{value}}\t}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1043,"y":207,"wires":[[]]},{"id":"78d6c71f.dc8798","type":"server-state-changed","z":"7f36d3a2.d1a03c","name":"Light strip effect changed","server":"ab3e2c53.e3491","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_select.light_strip_effect","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":164,"y":234,"wires":[["4445a53f.3166bc","dfd61061.a0e7f"]]},{"id":"4445a53f.3166bc","type":"change","z":"7f36d3a2.d1a03c","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"Static","fromt":"str","to":"1","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"Blink","fromt":"str","to":"2","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"Breath","fromt":"str","to":"3","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"Color_wipe","fromt":"str","to":"4","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"Color_wipe_reverse_inverse","fromt":"str","to":"5","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"Color_wipe_random","fromt":"str","to":"6","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"Random_color","fromt":"str","to":"7","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"Single_dynamic","fromt":"str","to":"8","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"Multi_dynamic","fromt":"str","to":"9","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"Rainbow","fromt":"str","to":"10","tot":"num"},{"t":"change","p":"payload","pt":"msg","from":"Rainbow_cycle","fromt":"str","to":"11","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"Scan","fromt":"str","to":"12","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"Dual_scan","fromt":"str","to":"13","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"Fade","fromt":"str","to":"14","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"Running_lights","fromt":"str","to":"15","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"Twinkle","fromt":"str","to":"16","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"Twinkle_random","fromt":"str","to":"17","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"Twinkle_fade","fromt":"str","to":"18","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"Twinkle_fade_random","fromt":"str","to":"19","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"Sparkle","fromt":"str","to":"20","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"Flash_sparkle","fromt":"str","to":"21","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"Hyper_sparkle","fromt":"str","to":"22","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"Strobe","fromt":"str","to":"23","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"Blink_rainbow","fromt":"str","to":"24","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"Chase_white","fromt":"str","to":"25","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"Chase_color","fromt":"str","to":"26","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"Chase_random","fromt":"str","to":"27","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"Chase_rainbow","fromt":"str","to":"28","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"Chase_flash","fromt":"str","to":"29","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"Chase_flash_random","fromt":"str","to":"30","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"Chase_rainbow_white","fromt":"str","to":"31","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"Chase_blackout","fromt":"str","to":"32","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"Chase_blackout_rainbow","fromt":"str","to":"33","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"Color_sweep_random","fromt":"str","to":"34","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"Running_color","fromt":"str","to":"35","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"Running_red_blue","fromt":"str","to":"36","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"Running_random","fromt":"str","to":"37","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"Larson_scanner","fromt":"str","to":"38","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"Comet","fromt":"str","to":"39","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"Fireworks","fromt":"str","to":"40","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"Fireworks_random","fromt":"str","to":"41","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"Merry_christmas","fromt":"str","to":"42","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"Circus_combustus","fromt":"str","to":"43","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"Halloween","fromt":"str","to":"44","tot":"num"},{"t":"change","p":"payload","pt":"msg","from":"Rainbow_aurora","fromt":"str","to":"45","tot":"num"},{"t":"change","p":"payload","pt":"msg","from":"Aurora","fromt":"str","to":"46","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":377,"y":234,"wires":[["54d5ca0b.4ba4c4","dfd61061.a0e7f"]]},{"id":"c92d757.9b09388","type":"api-call-service","z":"7f36d3a2.d1a03c","name":"Set Pixel Effect","server":"497693ef.d5e6bc","version":1,"debugenabled":false,"service_domain":"ozw","service":"set_config_parameter","entityId":"","data":"{\t \"node_id\":58,\t \"parameter\":31,\t \"value\":{{value}}\t}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1043,"y":270,"wires":[[]]},{"id":"dfd61061.a0e7f","type":"debug","z":"7f36d3a2.d1a03c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":592,"y":108,"wires":[]},{"id":"ab3e2c53.e3491","type":"server","name":"AvilaSmartHomeRpi","legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true},{"id":"497693ef.d5e6bc","type":"server","name":"Home Assistant","legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]