19 lines
507 B
Python
19 lines
507 B
Python
#!/usr/bin/env python3
|
|
import json
|
|
|
|
with open('/home/mdares/.node-red/flows.json', 'r') as f:
|
|
flows = json.load(f)
|
|
|
|
# Find the inject node and set it to run once on startup
|
|
for node in flows:
|
|
if node.get('id') == 'create_table_inject_temp':
|
|
node['once'] = True
|
|
node['onceDelay'] = 1
|
|
print("✓ Set inject node to run once on startup")
|
|
break
|
|
|
|
with open('/home/mdares/.node-red/flows.json', 'w') as f:
|
|
json.dump(flows, f, indent=4)
|
|
|
|
print("✓ Updated flows.json")
|