WARNING

Needs Custom Integrationopen in new window installed in Home Assistant for this node to function

Select

Creates a select entity in Home Assistant which can be manipulated from this node.

Configuration

Mode required

  • Type: 'listen' | 'get' | 'set'

The mode of the node

value required

  • Type: string

A string to the set current value of the select entity

Inputs

properties of msg.payload

Value

  • Type: string

The string of the text entity should be updated to

Outputs

Value types:

  • value: The text string of the entity
  • previous value: The previous text string of the entity
  • config: The config properties of the node

Examples

Usage example

screenshot

[{"id":"4321a3f756b4e04b","type":"ha-select","z":"489afaacb01df108","name":"","version":1,"debugenabled":false,"inputs":0,"outputs":1,"entityConfig":"be77e3a6884158eb","mode":"listen","value":"payload","valueType":"msg","outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"value"},{"property":"previousValue","propertyType":"msg","value":"","valueType":"previousValue"}],"x":94,"y":192,"wires":[["61e5b7c1daa37965"]]},{"id":"a8c7a4ebf79bc26a","type":"ha-select","z":"489afaacb01df108","name":"","version":1,"debugenabled":false,"inputs":1,"outputs":1,"entityConfig":"be77e3a6884158eb","mode":"set","value":"payload","valueType":"msg","outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"value"},{"property":"previousValue","propertyType":"msg","value":"","valueType":"previousValue"}],"x":290,"y":416,"wires":[[]]},{"id":"61e5b7c1daa37965","type":"debug","z":"489afaacb01df108","name":"select in","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"previousValue& \" : \" & payload","targetType":"jsonata","statusVal":"","statusType":"auto","x":388,"y":192,"wires":[]},{"id":"1c519ae737aa6361","type":"inject","z":"489afaacb01df108","name":"invalid option","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"invalid option!!!!","payloadType":"str","x":134,"y":416,"wires":[["a8c7a4ebf79bc26a"]]},{"id":"e0feb133879bf8aa","type":"inject","z":"489afaacb01df108","name":"","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":114,"y":320,"wires":[["3c6ef2defe605b5e"]]},{"id":"3c6ef2defe605b5e","type":"api-call-service","z":"489afaacb01df108","name":"","server":"","version":5,"debugenabled":false,"domain":"select","service":"select_next","areaId":[],"deviceId":[],"entityId":["select.test_select"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":330,"y":320,"wires":[[]]},{"id":"dee53ca19e7262f9","type":"server-state-changed","z":"489afaacb01df108","name":"","server":"","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"select.test_select","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,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":174,"y":240,"wires":[["b592f430a286d9d3"]]},{"id":"b592f430a286d9d3","type":"debug","z":"489afaacb01df108","name":"event state","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"data.old_state.state & \" : \" & payload","targetType":"jsonata","statusVal":"","statusType":"auto","x":398,"y":240,"wires":[]},{"id":"8425ced98c4ef688","type":"ha-select","z":"489afaacb01df108","name":"","version":1,"debugenabled":false,"inputs":1,"outputs":1,"entityConfig":"be77e3a6884158eb","mode":"set","value":"payload","valueType":"msg","outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"value"},{"property":"previousValue","propertyType":"msg","value":"","valueType":"previousValue"}],"x":542,"y":368,"wires":[["7668a7159575359b"]]},{"id":"ece11ecf7eeedf69","type":"inject","z":"489afaacb01df108","name":"","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":114,"y":368,"wires":[["2944cc4f94c015fa"]]},{"id":"7668a7159575359b","type":"debug","z":"489afaacb01df108","name":"select out","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"previousValue& \" : \" & payload","targetType":"jsonata","statusVal":"","statusType":"auto","x":684,"y":368,"wires":[]},{"id":"2944cc4f94c015fa","type":"api-current-state","z":"489afaacb01df108","name":"random option","server":"","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"select.test_select","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"( \t  $c := $entity().state;\t  $a := function($acc, $val){$c = $val ? $acc : $append($acc, $val)};\t  $r := $shuffle($entity().attributes.options);\t$reduce($r, $a, [])[0]\t)","valueType":"jsonata"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":320,"y":368,"wires":[["8425ced98c4ef688"]]},{"id":"1ebc7b227317b6c0","type":"ha-update-config","z":"489afaacb01df108","name":"","server":"bf5874816710d0c7","entityConfig":"be77e3a6884158eb","version":0,"outputProperties":[],"x":320,"y":560,"wires":[[]]},{"id":"8ea8951f4193e413","type":"inject","z":"489afaacb01df108","name":"1,2,3","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"options\": [\"1\",\"2\",\"3\"]}","payloadType":"json","x":110,"y":560,"wires":[["1ebc7b227317b6c0"]]},{"id":"2b4b5b649e5a03b5","type":"inject","z":"489afaacb01df108","name":"random strings","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"(\t  $charSet := [\t    \"a\",\t    \"b\",\t    \"c\",\t    \"d\",\t    \"e\",\t    \"f\",\t    \"g\",\t    \"h\",\t    \"i\",\t    \"j\",\t    \"k\",\t    \"l\",\t    \"m\",\t    \"n\",\t    \"o\",\t    \"p\",\t    \"q\",\t    \"r\",\t    \"s\",\t    \"t\",\t    \"u\",\t    \"v\",\t    \"w\",\t    \"x\",\t    \"y\",\t    \"z\",\t    \"A\",\t    \"B\",\t    \"C\",\t    \"D\",\t    \"E\",\t    \"F\",\t    \"G\",\t    \"H\",\t    \"I\",\t    \"J\",\t    \"K\",\t    \"L\",\t    \"M\",\t    \"N\",\t    \"O\",\t    \"P\",\t    \"Q\",\t    \"R\",\t    \"S\",\t    \"T\",\t    \"U\",\t    \"V\",\t    \"W\",\t    \"X\",\t    \"Y\",\t    \"Z\",\t    \"0\",\t    \"1\",\t    \"2\",\t    \"3\",\t    \"4\",\t    \"5\",\t    \"6\",\t    \"7\",\t    \"8\",\t    \"9\",\t    \"!\",\t    \"-\"\t];  \t  $randomChar := function(){\t      (\t          $randomCharChosen := $floor($random()* $count($charSet));\t          $charSet[$randomCharChosen];        \t      )\t  };\t \t\t{\t    \"options\": [\t        $reduce([0..10],function($v,$i){( $v & $randomChar();)}),\t        $reduce([0..10],function($v,$i){( $v & $randomChar();)}),\t        $reduce([0..10],function($v,$i){( $v & $randomChar();)}),\t        $reduce([0..10],function($v,$i){( $v & $randomChar();)}),\t        $reduce([0..10],function($v,$i){( $v & $randomChar();)})\t    ]\t}\t)","payloadType":"jsonata","x":140,"y":608,"wires":[["1ebc7b227317b6c0"]]},{"id":"a5d80ae6c463f4b8","type":"comment","z":"489afaacb01df108","name":"dynamically set options","info":"","x":148,"y":512,"wires":[]},{"id":"a0d398b3cdb34f01","type":"ha-select","z":"489afaacb01df108","name":"","version":1,"debugenabled":false,"inputs":1,"outputs":1,"entityConfig":"be77e3a6884158eb","mode":"get","value":"payload","valueType":"msg","outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"value"}],"x":290,"y":464,"wires":[["a7d33552113d6890"]]},{"id":"486e85c613ec63f5","type":"inject","z":"489afaacb01df108","name":"","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":114,"y":464,"wires":[["a0d398b3cdb34f01"]]},{"id":"a7d33552113d6890","type":"debug","z":"489afaacb01df108","name":"select get","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":432,"y":464,"wires":[]},{"id":"be77e3a6884158eb","type":"ha-entity-config","server":"bf5874816710d0c7","deviceConfig":"","name":"test select","version":"6","entityType":"select","haConfig":[{"property":"name","value":"test select"},{"property":"icon","value":""},{"property":"entity_category","value":""},{"property":"entity_picture","value":""},{"property":"options","value":["def","abc","132"]}],"resend":false,"debugEnabled":false}]