Find HA entity usage in Node-RED
nodered_find_entity_usageFind every Node-RED node and flow that references a Home Assistant entity before renaming or removing it. Scans exact fields, templates, code, and selectors without changing anything.
Instructions
List the Node-RED nodes and flows that reference one Home Assistant entity.
Reads GET /flows and scans every node's configuration: a field equal
to the entity id (exact, e.g. entities.entity, target.entityId),
the id inside a template, JSON or function code as a whole word
(text), and Home Assistant node selectors that would match it by
substring or regex (also the older entityId + entityIdType
form). Changes nothing.
Use when: checking what breaks before renaming or removing an entity, or
explaining what controls a device, together with HA automations.
Not for: HA automations and scripts — use search_find_related or
automations_validate_automation_references; nodes by type — use
nodered_search_nodes.
Returns: {"addon_slug", "rev", "entity_id", "nodes": [{id, type, name, flow_id, flow_label, in_subflow, disabled, match: [...], fields: [...]}], "flows": [{flow_id, flow_label, node_count}], "count", "skipped_patterns"}.
Errors: invalid_entity_id (no I/O), plus the add-on lookup errors of
nodered_list_flows.
Limits: a regex is evaluated with Python's engine; one over 200
characters or with nested quantifiers is skipped (counted in
skipped_patterns); entity ids built at runtime are not found.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"entity_id": "<entity_id>"
},
"name": "nodered_find_entity_usage"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| entity_id | Yes | Home Assistant entity id, e.g. `light.kitchen` or `binary_sensor.front_door`. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||