// Load room config into global (no require - Function nodes can't use it). // 1. Open node-red/config_files/room-config.js in the repo (mirror of server file). // 2. Copy the whole object: from "const ROOM_CONFIG = {" up to "};" (do NOT copy "module.exports"). // 3. Replace the ROOM_CONFIG below with your paste. Keep the two lines at the end. const ROOM_CONFIG = { roomNames: ['cmd_livingroom', 'cmd_out'], lightEntityMap: [ { room: 'light_livingRoom', light: 1, entityId: 'input_boolean.living_room_new' }, ], entityToRoom: { living_room_new: 'cmd_livingroom' }, deviceToRoom: { 'Office Switch': 'cmd_livingroom' }, deviceIdToName: {}, switchBindings: { 'Office Switch': { 1: { room: 'cmd_livingroom', light: 1 }, 2: { room: 'cmd_livingroom', light: 1 }, }, }, }; global.set('roomConfig', ROOM_CONFIG); node.warn('[Load room config] loaded: ' + ROOM_CONFIG.roomNames.length + ' rooms'); return null;