WARNING

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

Text

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

Configuration

Mode required

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

The mode of the node

Text required

  • Type: string

The string of the entity should be updated to

Inputs

properties of msg.payload

Text

  • 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":"dfc9e6f2b6ed5571","type":"inject","z":"22cd01e6b12bd120","name":"","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":114,"y":112,"wires":[["87c9fa353286db95"]]},{"id":"87c9fa353286db95","type":"function","z":"22cd01e6b12bd120","name":"random string","func":"msg.payload = Math.random().toString(36).substring(2, 10);\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":296,"y":112,"wires":[["f2a130d21700183b"]]},{"id":"871c3d4514b6adf5","type":"debug","z":"22cd01e6b12bd120","name":"text listen","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"previous & \" : \" & payload ","targetType":"jsonata","statusVal":"","statusType":"auto","x":276,"y":208,"wires":[]},{"id":"19ba2e97602e8052","type":"ha-text","z":"22cd01e6b12bd120","name":"","version":1,"debugenabled":false,"inputs":0,"outputs":1,"entityConfig":"541bfa3ffd06ec54","mode":"listen","value":"","valueType":"msg","outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"value"},{"property":"previous","propertyType":"msg","value":"","valueType":"previousValue"}],"x":118,"y":208,"wires":[["871c3d4514b6adf5"]]},{"id":"f2a130d21700183b","type":"ha-text","z":"22cd01e6b12bd120","name":"","version":1,"debugenabled":false,"inputs":1,"outputs":1,"entityConfig":"541bfa3ffd06ec54","mode":"set","value":"payload","valueType":"msg","outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"value"},{"property":"previous","propertyType":"msg","value":"","valueType":"previousValue"}],"x":458,"y":112,"wires":[["abf17eb28388908a"]]},{"id":"abf17eb28388908a","type":"debug","z":"22cd01e6b12bd120","name":"text set","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"previous & \" : \" & payload ","targetType":"jsonata","statusVal":"","statusType":"auto","x":628,"y":112,"wires":[]},{"id":"cfdda78a4cc69c43","type":"server-state-changed","z":"22cd01e6b12bd120","name":"","server":"","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"text.test_text","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":"previous","propertyType":"msg","value":"","valueType":"eventData"}],"x":184,"y":256,"wires":[["ad7370fad9297783"]]},{"id":"ad7370fad9297783","type":"debug","z":"22cd01e6b12bd120","name":"event state","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"previous.old_state.state & \" : \" & payload","targetType":"jsonata","statusVal":"","statusType":"auto","x":422,"y":256,"wires":[]},{"id":"2a2de323bc72c720","type":"inject","z":"22cd01e6b12bd120","name":"","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":114,"y":64,"wires":[["f888cc8fd9e941d4"]]},{"id":"c29c8b6386defada","type":"api-call-service","z":"22cd01e6b12bd120","name":"","server":"","version":5,"debugenabled":false,"domain":"text","service":"set_value","areaId":[],"deviceId":[],"entityId":["text.test_text"],"data":"{\"value\": payload }","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":488,"y":64,"wires":[[]]},{"id":"f888cc8fd9e941d4","type":"function","z":"22cd01e6b12bd120","name":"random string","func":"msg.payload = Math.random().toString(36).substring(2, 10);\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":296,"y":64,"wires":[["c29c8b6386defada"]]},{"id":"834d55ad3daf03df","type":"inject","z":"22cd01e6b12bd120","name":"","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":114,"y":160,"wires":[["9fba568d70b10862"]]},{"id":"9fba568d70b10862","type":"ha-text","z":"22cd01e6b12bd120","name":"","version":1,"debugenabled":false,"inputs":1,"outputs":1,"entityConfig":"541bfa3ffd06ec54","mode":"get","value":"payload","valueType":"msg","outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"value"},{"property":"previous","propertyType":"msg","value":"","valueType":"previousValue"}],"x":458,"y":160,"wires":[["c2cfe2d328d54aa3"]]},{"id":"c2cfe2d328d54aa3","type":"debug","z":"22cd01e6b12bd120","name":"text get","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"previous & \" : \" & payload ","targetType":"jsonata","statusVal":"","statusType":"auto","x":628,"y":160,"wires":[]},{"id":"541bfa3ffd06ec54","type":"ha-entity-config","server":"bf5874816710d0c7","deviceConfig":"","name":"test text","version":"6","entityType":"text","haConfig":[{"property":"name","value":"test text"},{"property":"icon","value":""},{"property":"entity_category","value":""},{"property":"entity_picture","value":""},{"property":"mode","value":"text"},{"property":"min_length","value":""},{"property":"max_length","value":""},{"property":"pattern","value":""}],"resend":false,"debugEnabled":false}]