diff --git a/locales/en-US/common.json b/locales/en-US/common.json index da6e6a9f39..a020ad7f90 100644 --- a/locales/en-US/common.json +++ b/locales/en-US/common.json @@ -7,8 +7,8 @@ "migrations": { "node_schema_updated": "Node schema has been updated", "all_nodes_updated": "Home Assistant nodes have been updated. Deploy to save changes.", - "message": "This will update all Home Assistant nodes to the current schema. It is not required for the nodes to function.\nNodes with yellow labels need to be updated before they can be edited. This can be done by either opening each node individually in the Node-RED editor or running this command.", - "warning": "It is recommended to backup your flows.json file before doing an update of all Home Assistant nodes.", + "message": "This will update all Home Assistant nodes to the current schema. This is not required for the nodes to function.\nNodes with yellow labels need to be updated before they can be edited. This can be done by either opening each node individually in the Node-RED editor or running this command.", + "warning": "It is recommended to back up your flows before doing an update of all Home Assistant nodes.", "title": "Update Home Assistant Nodes", "button_label": "Update Home Assistant Nodes", "button_ok": "Update Nodes", diff --git a/ui/shared/nodeversion.js b/ui/shared/nodeversion.js index 614269e61a..d503e5b98b 100644 --- a/ui/shared/nodeversion.js +++ b/ui/shared/nodeversion.js @@ -62,6 +62,11 @@ const nodeVersion = (function ($, RED, haMigrations) { migrate(node); } }); + RED.nodes.eachConfig((node) => { + if (isHomeAssistantNode(node) && !isCurrentVersion(node)) { + migrate(node); + } + }); RED.nodes.dirty(true); RED.notify(ha.i18n('home-assistant.ui.migrations.all_nodes_updated')); RED.view.redraw(); @@ -123,6 +128,11 @@ const nodeVersion = (function ($, RED, haMigrations) { count++; } }); + RED.nodes.eachConfig((n) => { + if (isHomeAssistantNode(n) && !isCurrentVersion(n)) { + count++; + } + }); return count; }