#!/usr/bin/env python3 import json with open('/home/mdares/.node-red/flows.json', 'r') as f: flows = json.load(f) # Find Work Order buttons node for node in flows: if node.get('id') == '9bbd4fade968036d': func_code = node.get('func', '') # Fix literal \n characters func_code = func_code.replace('\\n node.warn', '\n node.warn') node['func'] = func_code print("✓ Fixed newline characters") break with open('/home/mdares/.node-red/flows.json', 'w') as f: json.dump(flows, f, indent=4) print("✓ flows.json updated")