node-red-contrib-home-assistant-websocketnode-red-contrib-home-assistant-websocket
Guides
Nodes
FAQ
Cookbook
Scrubber
Discussions
Discord
Github
Guides
Nodes
FAQ
Cookbook
Scrubber
Discussions
Discord
Github
  • Config Nodes

    • Device Config
    • Entity Config
    • Server Config
  • General Nodes

    • Action
    • API
    • Current State
    • Device
    • Events: all
    • Events: calendar
    • Events: state
    • Fire Event
    • Get Entities
    • Get History
    • Poll State
    • Render Template
    • Sentence
    • Tag
    • Time
    • Trigger: state
    • Wait Until
    • Webhook
    • Zone
  • Entity Nodes

    • Binary Sensor
    • Button
    • Entity
    • Number
    • Select
    • Sensor
    • Switch
    • Text
    • Time
    • Update Config

Update Config

The Update Config node allows you to update the configuration of entities within Home Assistant. This node is used for dynamically adjusting the settings of entities, ensuring they stay in sync with your automation requirements.

Configuration

Name

  • Type: string

A name for the node.

Server

  • Type: string

The node id of a Server Config node.

Entity Config

  • Type: string

The node id of an entity config. This can be overridden by the payload.id property on the msg object.

Inputs

All properties must be under msg.payload and will be ignored if not.

Example input

Example of the msg.payload object.

{
  "id": "d9d27ac6b4ebf78f",
  "icon": "mdi:lightbulb",
  "name": "My Light",
  "entityPicture": "/local/images/my_light.png"
}

id

  • Type: string

The node id of an entity config.

icon

  • Type: string

The icon to use for the entity.

name

  • Type: string

The friendly name to use for the entity.

entityPicture

  • Type: string

The entity picture to use for the entity.

Examples

Usage example

screenshot

[{"id":"f74eb5b7233cf386","type":"inject","z":"0cd8900387d67b70","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":828,"y":192,"wires":[["f01a6d954835e535"]]},{"id":"f01a6d954835e535","type":"ha-sensor","z":"0cd8900387d67b70","name":"example one","entityConfig":"e4293de95073f8cd","version":0,"state":"$round($random() * 100, 0)","stateType":"jsonata","attributes":[],"inputOverride":"allow","outputProperties":[],"x":1002,"y":192,"wires":[[]]},{"id":"fa343985973ac02b","type":"ha-update-config","z":"0cd8900387d67b70","name":"","server":"bf5874816710d0c7","entityConfig":"d18ff4919779da55","version":0,"outputProperties":[],"x":1016,"y":288,"wires":[[]]},{"id":"d9d27ac6b4ebf78f","type":"inject","z":"0cd8900387d67b70","name":"override id","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"(\t   $icons := [\t       'mdi:home-assistant',\t       'mdi:home',\t       'mdi:home-outline',\t       'mdi:home-variant',\t       'mdi:home-variant-outline',\t       'mdi:home-city'\t       ];\t   $simpsons := [\t       \"homer\",\t       \"marge\",\t       \"bart\",\t       \"lisa\",\t       \"maggie\"\t   ];\t   $character := $shuffle($simpsons)[0];\t   {\t       \"name\": $character,\t       \"id\": \"e4293de95073f8cd\",\t       \"icon\": $shuffle($icons)[0],\t        \"entityPicture\": \"/local/\" & $character & \".png\"\t       }\t)","payloadType":"jsonata","x":828,"y":336,"wires":[["fa343985973ac02b"]]},{"id":"4171499cb42d4c08","type":"inject","z":"0cd8900387d67b70","name":"use default id","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"(\t    $simpsons := [\"homer\", \"marge\", \"bart\", \"lisa\", \"maggie\"];\t    {\"name\": $shuffle($simpsons)[0] ,\"icon\":\"\"}\t)","payloadType":"jsonata","x":834,"y":288,"wires":[["fa343985973ac02b"]]},{"id":"94e86f1c0b4f113d","type":"ha-sensor","z":"0cd8900387d67b70","name":"example two","entityConfig":"d18ff4919779da55","version":0,"state":"$round($random() * 100, 0)","stateType":"jsonata","attributes":[],"inputOverride":"allow","outputProperties":[],"x":1002,"y":240,"wires":[[]]},{"id":"0d31aa0621b4fe6f","type":"inject","z":"0cd8900387d67b70","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":828,"y":240,"wires":[["94e86f1c0b4f113d"]]},{"id":"e4293de95073f8cd","type":"ha-entity-config","server":"bf5874816710d0c7","deviceConfig":"","name":"example one","version":"6","entityType":"sensor","haConfig":[{"property":"name","value":"Node-RED example one"},{"property":"icon","value":""},{"property":"entity_category","value":""},{"property":"entity_picture","value":""},{"property":"device_class","value":""},{"property":"unit_of_measurement","value":""},{"property":"state_class","value":""}],"resend":false,"debugEnabled":false},{"id":"d18ff4919779da55","type":"ha-entity-config","server":"bf5874816710d0c7","deviceConfig":"","name":"example two","version":"6","entityType":"sensor","haConfig":[{"property":"name","value":"Node-RED example one"},{"property":"icon","value":""},{"property":"entity_category","value":""},{"property":"entity_picture","value":""},{"property":"device_class","value":""},{"property":"unit_of_measurement","value":"‎ "},{"property":"state_class","value":""}],"resend":false,"debugEnabled":false}]
```
Help us improve this page!
Last Updated:
Contributors: Jason
Prev
Time