Refactor room and light configurations for Node-RED integration

- Updated global variable lists in GVL_IO.gvl and GVL_NVL_placeholders.gvl to reflect new room naming conventions and structures.
- Revised PLC_App.st to map new room configurations for lighting control.
- Enhanced documentation in all-lights-and-rooms.md and ha-lights-and-rooms.md to align with updated room and light entity naming.
- Adjusted room-config.js and related Node-RED flows to support the new configuration structure.

This update improves the organization and clarity of room and light management within the Node-RED integration, ensuring consistency across the system.
This commit is contained in:
2026-04-01 19:09:59 +03:00
parent d755d3c1ed
commit 0af21f4dc3
16 changed files with 579 additions and 220 deletions

View File

@@ -4,17 +4,34 @@
// 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' },
roomNames: [
'open_plan_living_room',
'open_plan_dining_room',
'open_plan_entrance',
'open_plan_guest_wc',
'kitchen_kitchen',
'kitchen_pantry',
'bedrooms_office',
'bedrooms_hallway',
'bedrooms_laundry',
'bedrooms_shower',
'bedrooms_bedroom',
'master_bedroom_suite',
'master_bedroom_bathroom',
'exterior_veranda',
'exterior_entrance',
'exterior_yard',
],
entityToRoom: { living_room_new: 'cmd_livingroom' },
deviceToRoom: { 'Office Switch': 'cmd_livingroom' },
lightEntityMap: [
{ room: 'l_open_plan_living_room', light: 1, entityId: 'input_boolean.open_plan_living_room_main_1' },
],
entityToRoom: { open_plan_living_room_main: 'open_plan_living_room' },
deviceToRoom: { 'Office Switch': 'open_plan_living_room' },
deviceIdToName: {},
switchBindings: {
'Office Switch': {
1: { room: 'cmd_livingroom', light: 1 },
2: { room: 'cmd_livingroom', light: 1 },
1: { room: 'open_plan_living_room', light: 1 },
2: { room: 'open_plan_dining_room', light: 1 },
},
},
};