From a4551289f3d75aa5149c75bee47caa8bfb809b9d Mon Sep 17 00:00:00 2001 From: theautomation Date: Thu, 8 Feb 2024 20:53:19 +0100 Subject: [PATCH] Add domain prefix to flows --- ...n => automation_basement_ventilation.json} | 114 +- ...ation_climate_graph_input_select_all.json} | 2 +- ...doorbell.json => automation_doorbell.json} | 2 +- ...t_mode.json => automation_guest_mode.json} | 2 +- ...el.json => automation_infrared_panel.json} | 2 +- ....json => automation_location_request.json} | 2 +- ...er.json => automation_vacuum_cleaner.json} | 2 +- ...son => automation_wall_tablet_charge.json} | 2 +- ...on => automation_wall_tablet_display.json} | 2 +- ...n.json => automation_weather_station.json} | 2 +- ...ensors.json => energy_custom_sensors.json} | 2 +- ...r_record.json => energy_solar_record.json} | 2 +- ...pi.json => entertainment_spotify_api.json} | 2 +- ...n => entertainment_spotify_api_token.json} | 2 +- ... entertainment_tv_device_buttonpress.json} | 2 +- ...on => entertainment_tv_device_sensor.json} | 2 +- ...ertainment_tvscreen_auto_turn_on-off.json} | 2 +- ...tainment_tvscreen_device_buttonpress.json} | 2 +- ...entertainment_tvscreen_device_sensor.json} | 2 +- ...mics.json => light_dynamics_backyard.json} | 2 +- ...mics.json => light_dynamics_basement.json} | 2 +- ...ght.json => light_dynamics_cv_closet.json} | 0 ...amics.json => light_dynamics_hallway.json} | 2 +- src/data/flows/lights_on_and_restore.json | 494 +++++++ ...her.json => machine_state_dishwasher.json} | 2 +- ....json => machine_state_thumble_dryer.json} | 2 +- ...son => machine_state_washing_machine.json} | 2 +- ...json => notification_basement_window.json} | 0 .../{notify.json => notification_main.json} | 13 +- ...k_outside.json => scene_dark_outside.json} | 0 ...entering.json => scene_home_entering.json} | 2 +- ...e_leaving.json => scene_home_leaving.json} | 2 +- ..._outside.json => scene_light_outside.json} | 2 +- ...ning_time.json => scene_morning_time.json} | 2 +- .../{off_mode.json => scene_off_mode.json} | 2 +- .../{shelly_i3.json => scene_shelly_i3.json} | 2 +- .../{sleepmode.json => scene_sleepmode.json} | 2 +- ...ion_mode.json => scene_vacation_mode.json} | 2 +- ... scene_vacuum_cleaner_goto_trash_can.json} | 2 +- src/data/flows/security_backyard.json | 385 ++++++ ...security_home.json => security_house.json} | 1169 ++++++----------- ...e_co_alarm.json => security_smoke_co.json} | 478 +------ src/data/subflows/alarm lights.json | 386 ------ 43 files changed, 1444 insertions(+), 1661 deletions(-) rename src/data/flows/{basement_ventilation.json => automation_basement_ventilation.json} (99%) rename src/data/flows/{climate_graph_input_select_all.json => automation_climate_graph_input_select_all.json} (98%) rename src/data/flows/{doorbell.json => automation_doorbell.json} (99%) rename src/data/flows/{guest_mode.json => automation_guest_mode.json} (99%) rename src/data/flows/{infrared_panel.json => automation_infrared_panel.json} (99%) rename src/data/flows/{location_request.json => automation_location_request.json} (99%) rename src/data/flows/{vacuum_cleaner.json => automation_vacuum_cleaner.json} (99%) rename src/data/flows/{wall_tablet_charge.json => automation_wall_tablet_charge.json} (99%) rename src/data/flows/{wall_tablet_display.json => automation_wall_tablet_display.json} (99%) rename src/data/flows/{weather_station.json => automation_weather_station.json} (99%) rename src/data/flows/{custom_energy_sensors.json => energy_custom_sensors.json} (99%) rename src/data/flows/{ac_solar_record.json => energy_solar_record.json} (99%) rename src/data/flows/{spotify_api.json => entertainment_spotify_api.json} (99%) rename src/data/flows/{spotify_api_token.json => entertainment_spotify_api_token.json} (98%) rename src/data/flows/{tv_device_buttonpress.json => entertainment_tv_device_buttonpress.json} (99%) rename src/data/flows/{tv_device_sensor.json => entertainment_tv_device_sensor.json} (99%) rename src/data/flows/{tvscreen_auto_turn_on-off.json => entertainment_tvscreen_auto_turn_on-off.json} (99%) rename src/data/flows/{tvscreen_device_buttonpress.json => entertainment_tvscreen_device_buttonpress.json} (99%) rename src/data/flows/{tvscreen_device_sensor.json => entertainment_tvscreen_device_sensor.json} (99%) rename src/data/flows/{backyard_light_dynamics.json => light_dynamics_backyard.json} (99%) rename src/data/flows/{basement_light_dynamics.json => light_dynamics_basement.json} (99%) rename src/data/flows/{cv_closet_light.json => light_dynamics_cv_closet.json} (100%) rename src/data/flows/{hallway_light_dynamics.json => light_dynamics_hallway.json} (99%) create mode 100644 src/data/flows/lights_on_and_restore.json rename src/data/flows/{dishwasher.json => machine_state_dishwasher.json} (99%) rename src/data/flows/{thumble_dryer.json => machine_state_thumble_dryer.json} (99%) rename src/data/flows/{washing_machine.json => machine_state_washing_machine.json} (99%) rename src/data/flows/{basement_window.json => notification_basement_window.json} (100%) rename src/data/flows/{notify.json => notification_main.json} (97%) rename src/data/flows/{dark_outside.json => scene_dark_outside.json} (100%) rename src/data/flows/{home_entering.json => scene_home_entering.json} (99%) rename src/data/flows/{home_leaving.json => scene_home_leaving.json} (99%) rename src/data/flows/{light_outside.json => scene_light_outside.json} (99%) rename src/data/flows/{morning_time.json => scene_morning_time.json} (99%) rename src/data/flows/{off_mode.json => scene_off_mode.json} (99%) rename src/data/flows/{shelly_i3.json => scene_shelly_i3.json} (99%) rename src/data/flows/{sleepmode.json => scene_sleepmode.json} (99%) rename src/data/flows/{vacation_mode.json => scene_vacation_mode.json} (99%) rename src/data/flows/{vacuum_cleaner_goto_trash_can.json => scene_vacuum_cleaner_goto_trash_can.json} (98%) create mode 100644 src/data/flows/security_backyard.json rename src/data/flows/{security_home.json => security_house.json} (78%) rename src/data/flows/{smoke_co_alarm.json => security_smoke_co.json} (74%) delete mode 100644 src/data/subflows/alarm lights.json diff --git a/src/data/flows/basement_ventilation.json b/src/data/flows/automation_basement_ventilation.json similarity index 99% rename from src/data/flows/basement_ventilation.json rename to src/data/flows/automation_basement_ventilation.json index 4d0d39e..5640999 100644 --- a/src/data/flows/basement_ventilation.json +++ b/src/data/flows/automation_basement_ventilation.json @@ -1342,7 +1342,7 @@ { "id": "4e909abe.0b62e4", "type": "tab", - "label": "basement_ventilation", + "label": "automation_basement_ventilation", "disabled": false, "info": "" }, @@ -1431,63 +1431,19 @@ ] }, { - "id": "a1c0156c06d58e91", - "type": "join", - "z": "4e909abe.0b62e4", - "g": "0a1a2a6df765a339", - "name": "", - "mode": "custom", - "build": "merged", - "property": "notify", - "propertyType": "msg", - "key": "topic", - "joiner": "\\n", - "joinerType": "str", - "accumulate": false, - "timeout": "", - "count": "4", - "reduceRight": false, - "reduceExp": "", - "reduceInit": "", - "reduceInitType": "", - "reduceFixup": "", - "x": 2450, - "y": 800, - "wires": [ - [ - "ac04035c1896218b" - ] - ] - }, - { - "id": "ac04035c1896218b", - "type": "link out", - "z": "4e909abe.0b62e4", - "g": "0a1a2a6df765a339", - "name": "link_out_notify_basement_ventilation", - "mode": "link", - "links": [ - "8ed3b0974336e55b", - "a97f87cfab413716" - ], - "x": 2545, - "y": 800, - "wires": [] - }, - { - "id": "6502d163268904d4", + "id": "d6d0b5735ad8f20a", "type": "template", "z": "4e909abe.0b62e4", "g": "0a1a2a6df765a339", - "name": "title", - "field": "notify.title", + "name": "notification id", + "field": "notify.notification_id", "fieldType": "msg", "format": "handlebars", "syntax": "mustache", - "template": "Mechanische ventilatie", + "template": "mechanical_ventilation", "output": "str", - "x": 2290, - "y": 780, + "x": 2310, + "y": 860, "wires": [ [ "a1c0156c06d58e91" @@ -1515,25 +1471,69 @@ ] }, { - "id": "d6d0b5735ad8f20a", + "id": "6502d163268904d4", "type": "template", "z": "4e909abe.0b62e4", "g": "0a1a2a6df765a339", - "name": "notification id", - "field": "notify.notification_id", + "name": "title", + "field": "notify.title", "fieldType": "msg", "format": "handlebars", "syntax": "mustache", - "template": "mechanical_ventilation", + "template": "Mechanische ventilatie", "output": "str", - "x": 2310, - "y": 860, + "x": 2290, + "y": 780, "wires": [ [ "a1c0156c06d58e91" ] ] }, + { + "id": "ac04035c1896218b", + "type": "link out", + "z": "4e909abe.0b62e4", + "g": "0a1a2a6df765a339", + "name": "link_out_notify_basement_ventilation", + "mode": "link", + "links": [ + "8ed3b0974336e55b", + "a97f87cfab413716" + ], + "x": 2545, + "y": 800, + "wires": [] + }, + { + "id": "a1c0156c06d58e91", + "type": "join", + "z": "4e909abe.0b62e4", + "g": "0a1a2a6df765a339", + "name": "", + "mode": "custom", + "build": "merged", + "property": "notify", + "propertyType": "msg", + "key": "topic", + "joiner": "\\n", + "joinerType": "str", + "accumulate": false, + "timeout": "", + "count": "4", + "reduceRight": false, + "reduceExp": "", + "reduceInit": "", + "reduceInitType": "", + "reduceFixup": "", + "x": 2450, + "y": 800, + "wires": [ + [ + "ac04035c1896218b" + ] + ] + }, { "id": "a0fea0e8.d9a66", "type": "server-state-changed", diff --git a/src/data/flows/climate_graph_input_select_all.json b/src/data/flows/automation_climate_graph_input_select_all.json similarity index 98% rename from src/data/flows/climate_graph_input_select_all.json rename to src/data/flows/automation_climate_graph_input_select_all.json index 2fb3540..8b1a39f 100644 --- a/src/data/flows/climate_graph_input_select_all.json +++ b/src/data/flows/automation_climate_graph_input_select_all.json @@ -2,7 +2,7 @@ { "id": "1adcdebcdc8e5c39", "type": "tab", - "label": "climate_graph_input_select_all", + "label": "automation_climate_graph_input_select_all", "disabled": false, "info": "", "env": [] diff --git a/src/data/flows/doorbell.json b/src/data/flows/automation_doorbell.json similarity index 99% rename from src/data/flows/doorbell.json rename to src/data/flows/automation_doorbell.json index c39953c..a215501 100644 --- a/src/data/flows/doorbell.json +++ b/src/data/flows/automation_doorbell.json @@ -2,7 +2,7 @@ { "id": "3637eeb0.d96232", "type": "tab", - "label": "doorbell", + "label": "automation_doorbell", "disabled": false, "info": "" }, diff --git a/src/data/flows/guest_mode.json b/src/data/flows/automation_guest_mode.json similarity index 99% rename from src/data/flows/guest_mode.json rename to src/data/flows/automation_guest_mode.json index cb41631..16aee78 100644 --- a/src/data/flows/guest_mode.json +++ b/src/data/flows/automation_guest_mode.json @@ -2,7 +2,7 @@ { "id": "a7a34028d045deee", "type": "tab", - "label": "guest_mode", + "label": "automation_guest_mode", "disabled": false, "info": "", "env": [] diff --git a/src/data/flows/infrared_panel.json b/src/data/flows/automation_infrared_panel.json similarity index 99% rename from src/data/flows/infrared_panel.json rename to src/data/flows/automation_infrared_panel.json index 469b307..2f9b22e 100644 --- a/src/data/flows/infrared_panel.json +++ b/src/data/flows/automation_infrared_panel.json @@ -2,7 +2,7 @@ { "id": "d7c35c04cc0c5b68", "type": "tab", - "label": "infrared_panel", + "label": "automation_infrared_panel", "disabled": false, "info": "", "env": [] diff --git a/src/data/flows/location_request.json b/src/data/flows/automation_location_request.json similarity index 99% rename from src/data/flows/location_request.json rename to src/data/flows/automation_location_request.json index 0348368..1fb95bd 100644 --- a/src/data/flows/location_request.json +++ b/src/data/flows/automation_location_request.json @@ -2,7 +2,7 @@ { "id": "2a2d89771193fb8b", "type": "tab", - "label": "location_request", + "label": "automation_location_request", "disabled": false, "info": "", "env": [] diff --git a/src/data/flows/vacuum_cleaner.json b/src/data/flows/automation_vacuum_cleaner.json similarity index 99% rename from src/data/flows/vacuum_cleaner.json rename to src/data/flows/automation_vacuum_cleaner.json index 2eb6e76..5feae7d 100644 --- a/src/data/flows/vacuum_cleaner.json +++ b/src/data/flows/automation_vacuum_cleaner.json @@ -2,7 +2,7 @@ { "id": "55da1471.fda0fc", "type": "tab", - "label": "vacuum_cleaner", + "label": "automation_vacuum_cleaner", "disabled": false, "info": "" }, diff --git a/src/data/flows/wall_tablet_charge.json b/src/data/flows/automation_wall_tablet_charge.json similarity index 99% rename from src/data/flows/wall_tablet_charge.json rename to src/data/flows/automation_wall_tablet_charge.json index 7bfddff..3a4a34f 100644 --- a/src/data/flows/wall_tablet_charge.json +++ b/src/data/flows/automation_wall_tablet_charge.json @@ -2,7 +2,7 @@ { "id": "03ed0365a1543556", "type": "tab", - "label": "wall_tablet_charge", + "label": "automation_wall_tablet_charge", "disabled": true, "info": "", "env": [] diff --git a/src/data/flows/wall_tablet_display.json b/src/data/flows/automation_wall_tablet_display.json similarity index 99% rename from src/data/flows/wall_tablet_display.json rename to src/data/flows/automation_wall_tablet_display.json index 598413f..c7ddf4d 100644 --- a/src/data/flows/wall_tablet_display.json +++ b/src/data/flows/automation_wall_tablet_display.json @@ -2,7 +2,7 @@ { "id": "9f9f94838a3fcd77", "type": "tab", - "label": "wall_tablet_display", + "label": "automation_wall_tablet_display", "disabled": false, "info": "", "env": [] diff --git a/src/data/flows/weather_station.json b/src/data/flows/automation_weather_station.json similarity index 99% rename from src/data/flows/weather_station.json rename to src/data/flows/automation_weather_station.json index 01b7721..5ea0f2c 100644 --- a/src/data/flows/weather_station.json +++ b/src/data/flows/automation_weather_station.json @@ -2,7 +2,7 @@ { "id": "4dd07a1d.6e53e4", "type": "tab", - "label": "weather_station", + "label": "automation_weather_station", "disabled": false, "info": "" }, diff --git a/src/data/flows/custom_energy_sensors.json b/src/data/flows/energy_custom_sensors.json similarity index 99% rename from src/data/flows/custom_energy_sensors.json rename to src/data/flows/energy_custom_sensors.json index 6cc3c5f..d74c115 100644 --- a/src/data/flows/custom_energy_sensors.json +++ b/src/data/flows/energy_custom_sensors.json @@ -2,7 +2,7 @@ { "id": "46d98b35c2eee05b", "type": "tab", - "label": "custom_energy_sensors", + "label": "energy_custom_sensors", "disabled": false, "info": "", "env": [] diff --git a/src/data/flows/ac_solar_record.json b/src/data/flows/energy_solar_record.json similarity index 99% rename from src/data/flows/ac_solar_record.json rename to src/data/flows/energy_solar_record.json index da753c3..f2e655e 100644 --- a/src/data/flows/ac_solar_record.json +++ b/src/data/flows/energy_solar_record.json @@ -2,7 +2,7 @@ { "id": "99c1372046e45da7", "type": "tab", - "label": "ac_solar_record", + "label": "energy_solar_record", "disabled": false, "info": "", "env": [] diff --git a/src/data/flows/spotify_api.json b/src/data/flows/entertainment_spotify_api.json similarity index 99% rename from src/data/flows/spotify_api.json rename to src/data/flows/entertainment_spotify_api.json index a8daa15..944068f 100644 --- a/src/data/flows/spotify_api.json +++ b/src/data/flows/entertainment_spotify_api.json @@ -2,7 +2,7 @@ { "id": "53a5f07742283c4c", "type": "tab", - "label": "spotify_api", + "label": "entertainment_spotify_api", "disabled": false, "info": "", "env": [] diff --git a/src/data/flows/spotify_api_token.json b/src/data/flows/entertainment_spotify_api_token.json similarity index 98% rename from src/data/flows/spotify_api_token.json rename to src/data/flows/entertainment_spotify_api_token.json index f05032f..d865058 100644 --- a/src/data/flows/spotify_api_token.json +++ b/src/data/flows/entertainment_spotify_api_token.json @@ -2,7 +2,7 @@ { "id": "584b31926baad02b", "type": "tab", - "label": "spotify_api_token", + "label": "entertainment_spotify_api_token", "disabled": false, "info": "", "env": [] diff --git a/src/data/flows/tv_device_buttonpress.json b/src/data/flows/entertainment_tv_device_buttonpress.json similarity index 99% rename from src/data/flows/tv_device_buttonpress.json rename to src/data/flows/entertainment_tv_device_buttonpress.json index f61753c..85b7906 100644 --- a/src/data/flows/tv_device_buttonpress.json +++ b/src/data/flows/entertainment_tv_device_buttonpress.json @@ -2,7 +2,7 @@ { "id": "a4fbdd1c0456c1af", "type": "tab", - "label": "tv_device_buttonpress", + "label": "entertainment_tv_device_buttonpress", "disabled": false, "info": "", "env": [] diff --git a/src/data/flows/tv_device_sensor.json b/src/data/flows/entertainment_tv_device_sensor.json similarity index 99% rename from src/data/flows/tv_device_sensor.json rename to src/data/flows/entertainment_tv_device_sensor.json index b736b19..0fdfafa 100644 --- a/src/data/flows/tv_device_sensor.json +++ b/src/data/flows/entertainment_tv_device_sensor.json @@ -2,7 +2,7 @@ { "id": "67a16d037f1a73fc", "type": "tab", - "label": "tv_device_sensor", + "label": "entertainment_tv_device_sensor", "disabled": false, "info": "", "env": [] diff --git a/src/data/flows/tvscreen_auto_turn_on-off.json b/src/data/flows/entertainment_tvscreen_auto_turn_on-off.json similarity index 99% rename from src/data/flows/tvscreen_auto_turn_on-off.json rename to src/data/flows/entertainment_tvscreen_auto_turn_on-off.json index 843a96b..c990752 100644 --- a/src/data/flows/tvscreen_auto_turn_on-off.json +++ b/src/data/flows/entertainment_tvscreen_auto_turn_on-off.json @@ -2,7 +2,7 @@ { "id": "39f5e6336137f4b2", "type": "tab", - "label": "tvscreen_auto_turn_on-off", + "label": "entertainment_tvscreen_auto_turn_on-off", "disabled": false, "info": "", "env": [] diff --git a/src/data/flows/tvscreen_device_buttonpress.json b/src/data/flows/entertainment_tvscreen_device_buttonpress.json similarity index 99% rename from src/data/flows/tvscreen_device_buttonpress.json rename to src/data/flows/entertainment_tvscreen_device_buttonpress.json index 3568683..cc35498 100644 --- a/src/data/flows/tvscreen_device_buttonpress.json +++ b/src/data/flows/entertainment_tvscreen_device_buttonpress.json @@ -2,7 +2,7 @@ { "id": "2c496b90815e2d15", "type": "tab", - "label": "tvscreen_device_buttonpress", + "label": "entertainment_tvscreen_device_buttonpress", "disabled": false, "info": "", "env": [] diff --git a/src/data/flows/tvscreen_device_sensor.json b/src/data/flows/entertainment_tvscreen_device_sensor.json similarity index 99% rename from src/data/flows/tvscreen_device_sensor.json rename to src/data/flows/entertainment_tvscreen_device_sensor.json index fe47f51..a44e672 100644 --- a/src/data/flows/tvscreen_device_sensor.json +++ b/src/data/flows/entertainment_tvscreen_device_sensor.json @@ -2,7 +2,7 @@ { "id": "b1c954404ea39706", "type": "tab", - "label": "tvscreen_device_sensor", + "label": "entertainment_tvscreen_device_sensor", "disabled": false, "info": "", "env": [] diff --git a/src/data/flows/backyard_light_dynamics.json b/src/data/flows/light_dynamics_backyard.json similarity index 99% rename from src/data/flows/backyard_light_dynamics.json rename to src/data/flows/light_dynamics_backyard.json index 115cd04..6e6e269 100644 --- a/src/data/flows/backyard_light_dynamics.json +++ b/src/data/flows/light_dynamics_backyard.json @@ -2,7 +2,7 @@ { "id": "4b48188ca7b303d7", "type": "tab", - "label": "backyard_light_dynamics", + "label": "light_dynamics_backyard", "disabled": false, "info": "", "env": [] diff --git a/src/data/flows/basement_light_dynamics.json b/src/data/flows/light_dynamics_basement.json similarity index 99% rename from src/data/flows/basement_light_dynamics.json rename to src/data/flows/light_dynamics_basement.json index 139be2f..2fa070c 100644 --- a/src/data/flows/basement_light_dynamics.json +++ b/src/data/flows/light_dynamics_basement.json @@ -2,7 +2,7 @@ { "id": "2863cbc8bee70856", "type": "tab", - "label": "basement_light_dynamics", + "label": "light_dynamics_basement", "disabled": false, "info": "", "env": [] diff --git a/src/data/flows/cv_closet_light.json b/src/data/flows/light_dynamics_cv_closet.json similarity index 100% rename from src/data/flows/cv_closet_light.json rename to src/data/flows/light_dynamics_cv_closet.json diff --git a/src/data/flows/hallway_light_dynamics.json b/src/data/flows/light_dynamics_hallway.json similarity index 99% rename from src/data/flows/hallway_light_dynamics.json rename to src/data/flows/light_dynamics_hallway.json index 67fed6d..783dbeb 100644 --- a/src/data/flows/hallway_light_dynamics.json +++ b/src/data/flows/light_dynamics_hallway.json @@ -2,7 +2,7 @@ { "id": "8ca9fd35c2a2b1c4", "type": "tab", - "label": "hallway_light_dynamics", + "label": "light_dynamics_hallway", "disabled": false, "info": "", "env": [] diff --git a/src/data/flows/lights_on_and_restore.json b/src/data/flows/lights_on_and_restore.json new file mode 100644 index 0000000..597545a --- /dev/null +++ b/src/data/flows/lights_on_and_restore.json @@ -0,0 +1,494 @@ +[ + { + "id": "9a7094e42d673dc4", + "type": "tab", + "label": "lights_on_and_restore", + "disabled": false, + "info": "", + "env": [] + }, + { + "id": "a5e476b7342dd2fc", + "type": "junction", + "z": "9a7094e42d673dc4", + "x": 1150, + "y": 160, + "wires": [ + [ + "53a47bf861d4d73c" + ] + ] + }, + { + "id": "8954d811f3cec46a", + "type": "api-call-service", + "z": "9a7094e42d673dc4", + "name": "restore light on state", + "server": "4ba92433.2478cc", + "version": 5, + "debugenabled": false, + "domain": "", + "service": "turn_on", + "areaId": [], + "deviceId": [], + "entityId": [ + "{{payload.entity_id}}" + ], + "data": "{\"brightness\":\"{{payload.attributes.brightness}}\"}", + "dataType": "json", + "mergeContext": "", + "mustacheAltTags": false, + "outputProperties": [], + "queue": "none", + "x": 960, + "y": 360, + "wires": [ + [] + ] + }, + { + "id": "6dfa319026ac7058", + "type": "switch", + "z": "9a7094e42d673dc4", + "name": "on / off", + "property": "payload.state", + "propertyType": "msg", + "rules": [ + { + "t": "eq", + "v": "on", + "vt": "str" + }, + { + "t": "eq", + "v": "off", + "vt": "str" + } + ], + "checkall": "true", + "repair": false, + "outputs": 2, + "x": 790, + "y": 380, + "wires": [ + [ + "8954d811f3cec46a" + ], + [ + "f75d0ff36a4c5d27" + ] + ] + }, + { + "id": "f75d0ff36a4c5d27", + "type": "api-call-service", + "z": "9a7094e42d673dc4", + "name": "restore light off state", + "server": "4ba92433.2478cc", + "version": 5, + "debugenabled": false, + "domain": "{{payload.domain}}", + "service": "turn_off", + "areaId": [], + "deviceId": [], + "entityId": [ + "{{payload.entity_id}}" + ], + "data": "", + "dataType": "json", + "mergeContext": "", + "mustacheAltTags": false, + "outputProperties": [], + "queue": "none", + "x": 960, + "y": 420, + "wires": [ + [] + ] + }, + { + "id": "387fd151e9a8e19c", + "type": "delay", + "z": "9a7094e42d673dc4", + "name": "", + "pauseType": "delay", + "timeout": "5", + "timeoutUnits": "seconds", + "rate": "1", + "nbRateUnits": "1", + "rateUnits": "second", + "randomFirst": "1", + "randomLast": "5", + "randomUnits": "seconds", + "drop": false, + "outputs": 1, + "x": 520, + "y": 480, + "wires": [ + [ + "4410039256c7c052" + ] + ] + }, + { + "id": "4410039256c7c052", + "type": "change", + "z": "9a7094e42d673dc4", + "name": "send red to traffic", + "rules": [ + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "red", + "tot": "str" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 690, + "y": 480, + "wires": [ + [ + "7c96404bfb58afe2" + ] + ] + }, + { + "id": "48f6f035713adfb1", + "type": "change", + "z": "9a7094e42d673dc4", + "name": "set domain to light", + "rules": [ + { + "t": "set", + "p": "payload.domain", + "pt": "msg", + "to": "light", + "tot": "str" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 350, + "y": 340, + "wires": [ + [ + "7c96404bfb58afe2" + ] + ] + }, + { + "id": "01b577265818a66e", + "type": "change", + "z": "9a7094e42d673dc4", + "name": "send green to traffic", + "rules": [ + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "green", + "tot": "str" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 350, + "y": 380, + "wires": [ + [ + "7c96404bfb58afe2" + ] + ] + }, + { + "id": "53a47bf861d4d73c", + "type": "switch", + "z": "9a7094e42d673dc4", + "name": "", + "property": "alarm", + "propertyType": "msg", + "rules": [ + { + "t": "eq", + "v": "on", + "vt": "str" + }, + { + "t": "eq", + "v": "off", + "vt": "str" + } + ], + "checkall": "true", + "repair": false, + "outputs": 2, + "x": 130, + "y": 300, + "wires": [ + [ + "48f6f035713adfb1", + "46f8ea6b26f11100" + ], + [ + "01b577265818a66e" + ] + ] + }, + { + "id": "46f8ea6b26f11100", + "type": "api-call-service", + "z": "9a7094e42d673dc4", + "name": "turn on light", + "server": "4ba92433.2478cc", + "version": 5, + "debugenabled": false, + "domain": "light", + "service": "turn_on", + "areaId": [], + "deviceId": [], + "entityId": [], + "data": "{\"entity_id\":\"{{payload.entity_id}}\",\"brightness\":255}", + "dataType": "json", + "mergeContext": "", + "mustacheAltTags": false, + "outputProperties": [], + "queue": "none", + "x": 990, + "y": 300, + "wires": [ + [] + ] + }, + { + "id": "7c96404bfb58afe2", + "type": "traffic", + "z": "9a7094e42d673dc4", + "name": "traffic", + "property_allow": "payload", + "filter_allow": "green", + "ignore_case_allow": false, + "negate_allow": false, + "send_allow": false, + "property_stop": "payload", + "filter_stop": "red", + "ignore_case_stop": false, + "negate_stop": false, + "send_stop": false, + "default_start": false, + "differ": true, + "x": 610, + "y": 380, + "wires": [ + [ + "387fd151e9a8e19c", + "6dfa319026ac7058" + ] + ] + }, + { + "id": "a81dfb3ffd051b14", + "type": "comment", + "z": "9a7094e42d673dc4", + "name": "input requirements", + "info": "msg.alarm = off \nmsg.alarm = on", + "x": 110, + "y": 40, + "wires": [] + }, + { + "id": "8def04e9d2da1e31", + "type": "ha-get-entities", + "z": "9a7094e42d673dc4", + "name": "get all lights", + "server": "4ba92433.2478cc", + "version": 1, + "rules": [ + { + "property": "entity_id", + "logic": "starts_with", + "value": "light.shelly", + "valueType": "str" + } + ], + "outputType": "split", + "outputEmptyResults": false, + "outputLocationType": "msg", + "outputLocation": "payload", + "outputResultsCount": 1, + "x": 990, + "y": 100, + "wires": [ + [ + "a5e476b7342dd2fc" + ] + ] + }, + { + "id": "164322a018845856", + "type": "link in", + "z": "9a7094e42d673dc4", + "name": "lights_on_and_restore_backyard", + "links": [ + "133af224fc73de70" + ], + "x": 215, + "y": 160, + "wires": [ + [ + "19c45466f31ded4b" + ] + ] + }, + { + "id": "19c45466f31ded4b", + "type": "ha-get-entities", + "z": "9a7094e42d673dc4", + "name": "get backyard lights group", + "server": "4ba92433.2478cc", + "version": 1, + "rules": [ + { + "property": "entity_id", + "logic": "starts_with", + "value": "group.backyard_lights", + "valueType": "str" + } + ], + "outputType": "split", + "outputEmptyResults": false, + "outputLocationType": "msg", + "outputLocation": "payload", + "outputResultsCount": 1, + "x": 360, + "y": 160, + "wires": [ + [ + "7b9024d8c1350eb1" + ] + ] + }, + { + "id": "02aaf4776d07ae0c", + "type": "split", + "z": "9a7094e42d673dc4", + "name": "", + "splt": "\\n", + "spltType": "str", + "arraySplt": 1, + "arraySpltType": "len", + "stream": false, + "addname": "", + "x": 730, + "y": 160, + "wires": [ + [ + "8c4d367a03388fe3" + ] + ] + }, + { + "id": "7b9024d8c1350eb1", + "type": "change", + "z": "9a7094e42d673dc4", + "name": "", + "rules": [ + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "payload.attributes.entity_id", + "tot": "msg" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 580, + "y": 160, + "wires": [ + [ + "02aaf4776d07ae0c" + ] + ] + }, + { + "id": "8c4d367a03388fe3", + "type": "ha-get-entities", + "z": "9a7094e42d673dc4", + "name": "get backyard lights", + "server": "4ba92433.2478cc", + "version": 1, + "rules": [ + { + "property": "entity_id", + "logic": "is", + "value": "payload", + "valueType": "msg" + } + ], + "outputType": "split", + "outputEmptyResults": false, + "outputLocationType": "msg", + "outputLocation": "payload", + "outputResultsCount": 1, + "x": 970, + "y": 160, + "wires": [ + [ + "a5e476b7342dd2fc" + ] + ] + }, + { + "id": "43cbfb522e72cbe5", + "type": "link in", + "z": "9a7094e42d673dc4", + "name": "lights_on_and_restore_all", + "links": [ + "5874beb71c3c9523" + ], + "x": 215, + "y": 100, + "wires": [ + [ + "8def04e9d2da1e31" + ] + ] + }, + { + "id": "4ba92433.2478cc", + "type": "server", + "name": "Home Assistant", + "version": 5, + "addon": false, + "rejectUnauthorizedCerts": false, + "ha_boolean": "y|yes|true|on|home|open", + "connectionDelay": true, + "cacheJson": true, + "heartbeat": true, + "heartbeatInterval": "30", + "areaSelector": "id", + "deviceSelector": "id", + "entitySelector": "id", + "statusSeparator": "at: ", + "statusYear": "hidden", + "statusMonth": "short", + "statusDay": "numeric", + "statusHourCycle": "h23", + "statusTimeFormat": "h:m", + "enableGlobalContextStore": true + } +] \ No newline at end of file diff --git a/src/data/flows/dishwasher.json b/src/data/flows/machine_state_dishwasher.json similarity index 99% rename from src/data/flows/dishwasher.json rename to src/data/flows/machine_state_dishwasher.json index a818394..26fddf8 100644 --- a/src/data/flows/dishwasher.json +++ b/src/data/flows/machine_state_dishwasher.json @@ -2,7 +2,7 @@ { "id": "2437e768.8e34d8", "type": "tab", - "label": "dishwasher", + "label": "machine_state_dishwasher", "disabled": false, "info": "" }, diff --git a/src/data/flows/thumble_dryer.json b/src/data/flows/machine_state_thumble_dryer.json similarity index 99% rename from src/data/flows/thumble_dryer.json rename to src/data/flows/machine_state_thumble_dryer.json index 5d73964..1ff8439 100644 --- a/src/data/flows/thumble_dryer.json +++ b/src/data/flows/machine_state_thumble_dryer.json @@ -2,7 +2,7 @@ { "id": "72ef82b8.9d086c", "type": "tab", - "label": "thumble_dryer", + "label": "machine_state_thumble_dryer", "disabled": false, "info": "" }, diff --git a/src/data/flows/washing_machine.json b/src/data/flows/machine_state_washing_machine.json similarity index 99% rename from src/data/flows/washing_machine.json rename to src/data/flows/machine_state_washing_machine.json index e48b946..3a12b73 100644 --- a/src/data/flows/washing_machine.json +++ b/src/data/flows/machine_state_washing_machine.json @@ -2,7 +2,7 @@ { "id": "c23003c7.1c978", "type": "tab", - "label": "washing_machine", + "label": "machine_state_washing_machine", "disabled": false, "info": "" }, diff --git a/src/data/flows/basement_window.json b/src/data/flows/notification_basement_window.json similarity index 100% rename from src/data/flows/basement_window.json rename to src/data/flows/notification_basement_window.json diff --git a/src/data/flows/notify.json b/src/data/flows/notification_main.json similarity index 97% rename from src/data/flows/notify.json rename to src/data/flows/notification_main.json index be8ef4c..9f7967d 100644 --- a/src/data/flows/notify.json +++ b/src/data/flows/notification_main.json @@ -2,7 +2,7 @@ { "id": "343515a5528e14f0", "type": "tab", - "label": "notify", + "label": "notification_main", "disabled": false, "info": "", "env": [] @@ -54,7 +54,10 @@ "ef18c5c2564a7e77", "c6bc1abd0ea4d3e7", "0b0c89810da47741", - "dfe89d053727bf74" + "dfe89d053727bf74", + "59c627d5f35a1bc2", + "d43e56b2e0de8b6e", + "b41a40c1e135e55c" ], "x": 195, "y": 140, @@ -72,7 +75,8 @@ "links": [ "68e61dcfb6db1de4", "ef18c5c2564a7e77", - "c6bc1abd0ea4d3e7" + "c6bc1abd0ea4d3e7", + "d43e56b2e0de8b6e" ], "x": 195, "y": 200, @@ -310,7 +314,8 @@ "ac254d4235d71700", "c5f04c8242157305", "f5a1c4dd087e0795", - "fdba7cd037a9da5a" + "fdba7cd037a9da5a", + "d43e56b2e0de8b6e" ], "x": 195, "y": 380, diff --git a/src/data/flows/dark_outside.json b/src/data/flows/scene_dark_outside.json similarity index 100% rename from src/data/flows/dark_outside.json rename to src/data/flows/scene_dark_outside.json diff --git a/src/data/flows/home_entering.json b/src/data/flows/scene_home_entering.json similarity index 99% rename from src/data/flows/home_entering.json rename to src/data/flows/scene_home_entering.json index e51c0f9..0b819c5 100644 --- a/src/data/flows/home_entering.json +++ b/src/data/flows/scene_home_entering.json @@ -2,7 +2,7 @@ { "id": "c0da8379.b0dd3", "type": "tab", - "label": "home_entering", + "label": "scene_home_entering", "disabled": false, "info": "" }, diff --git a/src/data/flows/home_leaving.json b/src/data/flows/scene_home_leaving.json similarity index 99% rename from src/data/flows/home_leaving.json rename to src/data/flows/scene_home_leaving.json index b4e1d8f..961c8cb 100644 --- a/src/data/flows/home_leaving.json +++ b/src/data/flows/scene_home_leaving.json @@ -2,7 +2,7 @@ { "id": "8aa6edec.5a013", "type": "tab", - "label": "home_leaving", + "label": "scene_home_leaving", "disabled": false, "info": "" }, diff --git a/src/data/flows/light_outside.json b/src/data/flows/scene_light_outside.json similarity index 99% rename from src/data/flows/light_outside.json rename to src/data/flows/scene_light_outside.json index 91800c2..75e7920 100644 --- a/src/data/flows/light_outside.json +++ b/src/data/flows/scene_light_outside.json @@ -2,7 +2,7 @@ { "id": "e0e34b3e49b36c0e", "type": "tab", - "label": "light_outside", + "label": "scene_light_outside", "disabled": false, "info": "", "env": [] diff --git a/src/data/flows/morning_time.json b/src/data/flows/scene_morning_time.json similarity index 99% rename from src/data/flows/morning_time.json rename to src/data/flows/scene_morning_time.json index 2376f4a..f985099 100644 --- a/src/data/flows/morning_time.json +++ b/src/data/flows/scene_morning_time.json @@ -2,7 +2,7 @@ { "id": "6af65daafa363be0", "type": "tab", - "label": "morning_time", + "label": "scene_morning_time", "disabled": false, "info": "", "env": [] diff --git a/src/data/flows/off_mode.json b/src/data/flows/scene_off_mode.json similarity index 99% rename from src/data/flows/off_mode.json rename to src/data/flows/scene_off_mode.json index 2c56430..42b3cda 100644 --- a/src/data/flows/off_mode.json +++ b/src/data/flows/scene_off_mode.json @@ -2,7 +2,7 @@ { "id": "eb1939ba1b7e9b73", "type": "tab", - "label": "off_mode", + "label": "scene_off_mode", "disabled": false, "info": "", "env": [] diff --git a/src/data/flows/shelly_i3.json b/src/data/flows/scene_shelly_i3.json similarity index 99% rename from src/data/flows/shelly_i3.json rename to src/data/flows/scene_shelly_i3.json index 381a540..5f1d6a3 100644 --- a/src/data/flows/shelly_i3.json +++ b/src/data/flows/scene_shelly_i3.json @@ -2,7 +2,7 @@ { "id": "f180ab88.925788", "type": "tab", - "label": "shelly_i3", + "label": "scene_shelly_i3", "disabled": false, "info": "" }, diff --git a/src/data/flows/sleepmode.json b/src/data/flows/scene_sleepmode.json similarity index 99% rename from src/data/flows/sleepmode.json rename to src/data/flows/scene_sleepmode.json index c88e2a8..048012d 100644 --- a/src/data/flows/sleepmode.json +++ b/src/data/flows/scene_sleepmode.json @@ -2,7 +2,7 @@ { "id": "e4381ced98d2a929", "type": "tab", - "label": "sleepmode", + "label": "scene_sleepmode", "disabled": false, "info": "", "env": [] diff --git a/src/data/flows/vacation_mode.json b/src/data/flows/scene_vacation_mode.json similarity index 99% rename from src/data/flows/vacation_mode.json rename to src/data/flows/scene_vacation_mode.json index 7aefd52..56950f5 100644 --- a/src/data/flows/vacation_mode.json +++ b/src/data/flows/scene_vacation_mode.json @@ -2,7 +2,7 @@ { "id": "e98ae3c9db1bd6c3", "type": "tab", - "label": "vacation_mode", + "label": "scene_vacation_mode", "disabled": false, "info": "", "env": [] diff --git a/src/data/flows/vacuum_cleaner_goto_trash_can.json b/src/data/flows/scene_vacuum_cleaner_goto_trash_can.json similarity index 98% rename from src/data/flows/vacuum_cleaner_goto_trash_can.json rename to src/data/flows/scene_vacuum_cleaner_goto_trash_can.json index 5b7c632..eb269a8 100644 --- a/src/data/flows/vacuum_cleaner_goto_trash_can.json +++ b/src/data/flows/scene_vacuum_cleaner_goto_trash_can.json @@ -2,7 +2,7 @@ { "id": "d75716f30ab50f51", "type": "tab", - "label": "vacuum_cleaner_goto_trash_can", + "label": "scene_vacuum_cleaner_goto_trash_can", "disabled": false, "info": "", "env": [] diff --git a/src/data/flows/security_backyard.json b/src/data/flows/security_backyard.json new file mode 100644 index 0000000..d12fda9 --- /dev/null +++ b/src/data/flows/security_backyard.json @@ -0,0 +1,385 @@ +[ + { + "id": "645478ab1138fd33", + "type": "tab", + "label": "security_backyard", + "disabled": false, + "info": "", + "env": [] + }, + { + "id": "f2952a0e7861984f", + "type": "group", + "z": "645478ab1138fd33", + "name": "notify", + "style": { + "label": true + }, + "nodes": [ + "2e62b582b5ace0b2", + "6011ff5a330d5f46", + "b151676bc37a1e90", + "be68c8baf380f74e", + "dfebcb371c6d37c4", + "b41a40c1e135e55c", + "ed20a5d29a5eb136" + ], + "x": 714, + "y": 39, + "w": 422, + "h": 202 + }, + { + "id": "abca9d489cb39d05", + "type": "junction", + "z": "645478ab1138fd33", + "x": 280, + "y": 100, + "wires": [ + [ + "56c442aec754c164" + ] + ] + }, + { + "id": "be68c8baf380f74e", + "type": "junction", + "z": "645478ab1138fd33", + "g": "f2952a0e7861984f", + "x": 740, + "y": 80, + "wires": [ + [ + "6011ff5a330d5f46", + "2e62b582b5ace0b2", + "dfebcb371c6d37c4", + "ed20a5d29a5eb136" + ] + ] + }, + { + "id": "c468b53056a67579", + "type": "comment", + "z": "645478ab1138fd33", + "name": "Backyard motion detection flow", + "info": "", + "x": 150, + "y": 20, + "wires": [] + }, + { + "id": "4f5603c50cf3e3f1", + "type": "server-state-changed", + "z": "645478ab1138fd33", + "name": "backyard motion sensor 01", + "server": "4ba92433.2478cc", + "version": 5, + "outputs": 2, + "exposeAsEntityConfig": "", + "entityId": "binary_sensor.backyard_motion_sensor_01_motion", + "entityIdType": "exact", + "outputInitially": false, + "stateType": "str", + "ifState": "on", + "ifStateType": "str", + "ifStateOperator": "is", + "outputOnlyOnStateChange": true, + "for": "0", + "forType": "num", + "forUnits": "minutes", + "ignorePrevStateNull": false, + "ignorePrevStateUnknown": true, + "ignorePrevStateUnavailable": true, + "ignoreCurrentStateUnknown": true, + "ignoreCurrentStateUnavailable": true, + "outputProperties": [ + { + "property": "payload", + "propertyType": "msg", + "value": "", + "valueType": "entityState" + }, + { + "property": "data", + "propertyType": "msg", + "value": "", + "valueType": "eventData" + }, + { + "property": "topic", + "propertyType": "msg", + "value": "", + "valueType": "triggerId" + } + ], + "x": 130, + "y": 60, + "wires": [ + [ + "1454a2634cd314fa" + ], + [ + "abca9d489cb39d05" + ] + ] + }, + { + "id": "1454a2634cd314fa", + "type": "api-current-state", + "z": "645478ab1138fd33", + "name": "home security is on", + "server": "4ba92433.2478cc", + "version": 3, + "outputs": 2, + "halt_if": "on", + "halt_if_type": "str", + "halt_if_compare": "is", + "entity_id": "input_boolean.home_security", + "state_type": "str", + "blockInputOverrides": false, + "outputProperties": [ + { + "property": "payload", + "propertyType": "msg", + "value": "", + "valueType": "entityState" + }, + { + "property": "data", + "propertyType": "msg", + "value": "", + "valueType": "entity" + } + ], + "for": "0", + "forType": "num", + "forUnits": "minutes", + "override_topic": false, + "state_location": "payload", + "override_payload": "msg", + "entity_location": "data", + "override_data": "msg", + "x": 370, + "y": 60, + "wires": [ + [ + "1117f663f7ece955" + ], + [] + ] + }, + { + "id": "1117f663f7ece955", + "type": "change", + "z": "645478ab1138fd33", + "name": "set msg.alarm on", + "rules": [ + { + "t": "set", + "p": "alarm", + "pt": "msg", + "to": "on", + "tot": "str" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 570, + "y": 60, + "wires": [ + [ + "133af224fc73de70", + "be68c8baf380f74e" + ] + ] + }, + { + "id": "56c442aec754c164", + "type": "change", + "z": "645478ab1138fd33", + "name": "set msg.alarm off", + "rules": [ + { + "t": "set", + "p": "alarm", + "pt": "msg", + "to": "off", + "tot": "str" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 570, + "y": 100, + "wires": [ + [ + "133af224fc73de70" + ] + ] + }, + { + "id": "133af224fc73de70", + "type": "link out", + "z": "645478ab1138fd33", + "name": "backyard_motion_to_lights_restore", + "mode": "link", + "links": [ + "164322a018845856" + ], + "x": 735, + "y": 300, + "wires": [] + }, + { + "id": "2e62b582b5ace0b2", + "type": "template", + "z": "645478ab1138fd33", + "g": "f2952a0e7861984f", + "name": "icon", + "field": "notify.icon", + "fieldType": "msg", + "format": "handlebars", + "syntax": "mustache", + "template": "", + "output": "str", + "x": 850, + "y": 120, + "wires": [ + [ + "b151676bc37a1e90" + ] + ] + }, + { + "id": "6011ff5a330d5f46", + "type": "template", + "z": "645478ab1138fd33", + "g": "f2952a0e7861984f", + "name": "title", + "field": "notify.title", + "fieldType": "msg", + "format": "handlebars", + "syntax": "mustache", + "template": "Alarm", + "output": "str", + "x": 850, + "y": 80, + "wires": [ + [ + "b151676bc37a1e90" + ] + ] + }, + { + "id": "b151676bc37a1e90", + "type": "join", + "z": "645478ab1138fd33", + "g": "f2952a0e7861984f", + "name": "", + "mode": "custom", + "build": "merged", + "property": "notify", + "propertyType": "msg", + "key": "topic", + "joiner": "\\n", + "joinerType": "str", + "accumulate": false, + "timeout": "", + "count": "4", + "reduceRight": false, + "reduceExp": "", + "reduceInit": "", + "reduceInitType": "", + "reduceFixup": "", + "x": 1010, + "y": 100, + "wires": [ + [ + "b41a40c1e135e55c" + ] + ] + }, + { + "id": "dfebcb371c6d37c4", + "type": "template", + "z": "645478ab1138fd33", + "g": "f2952a0e7861984f", + "name": "notification id", + "field": "notify.notification_id", + "fieldType": "msg", + "format": "handlebars", + "syntax": "mustache", + "template": "backyard_alarm", + "output": "str", + "x": 870, + "y": 160, + "wires": [ + [ + "b151676bc37a1e90" + ] + ] + }, + { + "id": "b41a40c1e135e55c", + "type": "link out", + "z": "645478ab1138fd33", + "g": "f2952a0e7861984f", + "name": "backyard_motion_to_notify", + "mode": "link", + "links": [ + "8ed3b0974336e55b" + ], + "x": 1095, + "y": 100, + "wires": [] + }, + { + "id": "ed20a5d29a5eb136", + "type": "template", + "z": "645478ab1138fd33", + "g": "f2952a0e7861984f", + "name": "message", + "field": "notify.message", + "fieldType": "msg", + "format": "handlebars", + "syntax": "mustache", + "template": "Beweging in de achtertuin gedetecteerd!", + "output": "str", + "x": 860, + "y": 200, + "wires": [ + [ + "b151676bc37a1e90" + ] + ] + }, + { + "id": "4ba92433.2478cc", + "type": "server", + "name": "Home Assistant", + "version": 5, + "addon": false, + "rejectUnauthorizedCerts": false, + "ha_boolean": "y|yes|true|on|home|open", + "connectionDelay": true, + "cacheJson": true, + "heartbeat": true, + "heartbeatInterval": "30", + "areaSelector": "id", + "deviceSelector": "id", + "entitySelector": "id", + "statusSeparator": "at: ", + "statusYear": "hidden", + "statusMonth": "short", + "statusDay": "numeric", + "statusHourCycle": "h23", + "statusTimeFormat": "h:m", + "enableGlobalContextStore": true + } +] \ No newline at end of file diff --git a/src/data/flows/security_home.json b/src/data/flows/security_house.json similarity index 78% rename from src/data/flows/security_home.json rename to src/data/flows/security_house.json index 4f0f8c7..f87fb46 100644 --- a/src/data/flows/security_home.json +++ b/src/data/flows/security_house.json @@ -1,492 +1,388 @@ [ { - "id": "99804b5f.9adb6", - "type": "subflow", - "name": "alarm lights", - "info": "", - "category": "", - "in": [ - { - "x": 40, - "y": 100, - "wires": [ - { - "id": "fd745c51.01fc5" - } - ] - } - ], - "out": [], - "env": [], - "color": "#DDAA99" + "id": "b13ca13c.9328e", + "type": "tab", + "label": "security_house", + "disabled": false, + "info": "" }, { - "id": "af7b80fc.c3023", - "type": "api-call-service", - "z": "99804b5f.9adb6", - "name": "restore light on state", - "server": "4ba92433.2478cc", - "version": 5, - "debugenabled": false, - "domain": "", - "service": "turn_on", - "areaId": [], - "deviceId": [], - "entityId": [ - "{{payload.entity_id}}" + "id": "1b05fecd5ed3289b", + "type": "group", + "z": "b13ca13c.9328e", + "name": "notify", + "style": { + "label": true + }, + "nodes": [ + "dab28de38f3a6629", + "ab8c69e6298f0ad4", + "ac254d4235d71700", + "47c9e5d66b827b3c", + "3a0c4f886a8c4e54", + "52d10ab03d478bae" ], - "data": "{\"brightness\":\"{{payload.attributes.brightness}}\"}", - "dataType": "json", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 1160, - "y": 160, - "wires": [ - [] - ] + "x": 1774, + "y": 399, + "w": 432, + "h": 162 }, { - "id": "bcb3a700.ce17f8", - "type": "ha-get-entities", - "z": "99804b5f.9adb6", - "name": "get all lights", - "server": "4ba92433.2478cc", - "version": 1, - "rules": [ - { - "property": "entity_id", - "logic": "starts_with", - "value": "light.shelly", - "valueType": "str" - } + "id": "37c7c59a61d38b32", + "type": "group", + "z": "b13ca13c.9328e", + "name": "notify two actions", + "style": { + "label": true + }, + "nodes": [ + "16bf3029dc11f50b", + "8bd6ce7359e6fe2f", + "48cae6c1e3fb0c75", + "1c8dfa7ab499ce29", + "3ad564319a62aa0f", + "3f7e2f446cdb3e90", + "66e66f9f5828f878" ], - "outputType": "split", - "outputEmptyResults": false, - "outputLocationType": "msg", - "outputLocation": "payload", - "outputResultsCount": 1, - "x": 330, - "y": 100, - "wires": [ - [ - "cf32e234.47719", - "fc63001e.69dc4" - ] - ] + "x": 1774, + "y": 159, + "w": 442, + "h": 202 }, { - "id": "5230c2e.d12123c", - "type": "switch", - "z": "99804b5f.9adb6", - "name": "on / off", - "property": "payload.state", - "propertyType": "msg", - "rules": [ - { - "t": "eq", - "v": "on", - "vt": "str" - }, - { - "t": "eq", - "v": "off", - "vt": "str" - } - ], - "checkall": "true", - "repair": false, - "outputs": 2, - "x": 950, - "y": 180, + "id": "3a0c4f886a8c4e54", + "type": "junction", + "z": "b13ca13c.9328e", + "g": "1b05fecd5ed3289b", + "x": 1800, + "y": 460, "wires": [ [ - "af7b80fc.c3023" - ], - [ - "e15ce8b1.b6e1b8" + "ab8c69e6298f0ad4", + "dab28de38f3a6629", + "52d10ab03d478bae" ] ] }, { - "id": "e15ce8b1.b6e1b8", - "type": "api-call-service", - "z": "99804b5f.9adb6", - "name": "restore light off state", - "server": "4ba92433.2478cc", - "version": 5, - "debugenabled": false, - "domain": "{{payload.domain}}", - "service": "turn_off", - "areaId": [], - "deviceId": [], - "entityId": [ - "{{payload.entity_id}}" - ], - "data": "", - "dataType": "json", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 1160, - "y": 200, - "wires": [ - [] - ] - }, - { - "id": "ff3fd036.814d8", - "type": "delay", - "z": "99804b5f.9adb6", - "name": "", - "pauseType": "delay", - "timeout": "5", - "timeoutUnits": "seconds", - "rate": "1", - "nbRateUnits": "1", - "rateUnits": "second", - "randomFirst": "1", - "randomLast": "5", - "randomUnits": "seconds", - "drop": false, - "outputs": 1, - "x": 740, - "y": 280, + "id": "3ad564319a62aa0f", + "type": "junction", + "z": "b13ca13c.9328e", + "g": "37c7c59a61d38b32", + "x": 1800, + "y": 240, "wires": [ [ - "c6fb625.0c939a" + "8bd6ce7359e6fe2f", + "16bf3029dc11f50b", + "3f7e2f446cdb3e90", + "66e66f9f5828f878" ] ] }, { - "id": "c6fb625.0c939a", - "type": "change", - "z": "99804b5f.9adb6", - "name": "send red to traffic", - "rules": [ - { - "t": "set", - "p": "payload", - "pt": "msg", - "to": "red", - "tot": "str" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 910, - "y": 280, + "id": "b2806f2a332a95dd", + "type": "junction", + "z": "b13ca13c.9328e", + "x": 960, + "y": 180, "wires": [ [ - "b3c56923.a20108" + "266c6e1c01c791a8" ] ] }, { - "id": "fc63001e.69dc4", - "type": "change", - "z": "99804b5f.9adb6", - "name": "set domain to light", - "rules": [ - { - "t": "set", - "p": "payload.domain", - "pt": "msg", - "to": "light", - "tot": "str" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 530, - "y": 140, + "id": "266c6e1c01c791a8", + "type": "junction", + "z": "b13ca13c.9328e", + "x": 1100, + "y": 180, "wires": [ [ - "b3c56923.a20108" + "743671d6.44575" ] ] }, { - "id": "952a70ca.b8532", - "type": "change", - "z": "99804b5f.9adb6", - "name": "send green to traffic", - "rules": [ - { - "t": "set", - "p": "payload", - "pt": "msg", - "to": "green", - "tot": "str" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 530, - "y": 180, + "id": "1d1ec90f6d5f3048", + "type": "junction", + "z": "b13ca13c.9328e", + "x": 960, + "y": 160, "wires": [ [ - "b3c56923.a20108" + "15e791691fffba6e" ] ] }, { - "id": "fd745c51.01fc5", - "type": "switch", - "z": "99804b5f.9adb6", - "name": "", - "property": "alarm", - "propertyType": "msg", - "rules": [ - { - "t": "eq", - "v": "on", - "vt": "str" - }, - { - "t": "eq", - "v": "off", - "vt": "str" - } - ], - "checkall": "true", - "repair": false, - "outputs": 2, - "x": 150, - "y": 100, + "id": "15e791691fffba6e", + "type": "junction", + "z": "b13ca13c.9328e", + "x": 1480, + "y": 160, "wires": [ [ - "bcb3a700.ce17f8" - ], - [ - "952a70ca.b8532" + "40140a3.8383df4", + "668b5737b0f584a7" ] ] }, { - "id": "449328ad.e5c798", - "type": "api-call-service", - "z": "99804b5f.9adb6", - "name": "turn on all lights", - "server": "4ba92433.2478cc", - "version": 5, - "debugenabled": false, - "domain": "light", - "service": "turn_on", - "areaId": [], - "deviceId": [], - "entityId": [], - "data": "{\"entity_id\":\"{{payload.entity_id}}\",\"brightness\":255}", - "dataType": "json", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 1140, - "y": 100, - "wires": [ - [] - ] - }, - { - "id": "b3c56923.a20108", - "type": "traffic", - "z": "99804b5f.9adb6", - "name": "traffic", - "property_allow": "payload", - "filter_allow": "green", - "ignore_case_allow": false, - "negate_allow": false, - "send_allow": false, - "property_stop": "payload", - "filter_stop": "red", - "ignore_case_stop": false, - "negate_stop": false, - "send_stop": false, - "default_start": false, - "differ": true, - "x": 730, - "y": 180, + "id": "52d10ab03d478bae", + "type": "template", + "z": "b13ca13c.9328e", + "g": "1b05fecd5ed3289b", + "name": "notification id", + "field": "notify.notification_id", + "fieldType": "msg", + "format": "handlebars", + "syntax": "mustache", + "template": "", + "output": "str", + "x": 1930, + "y": 520, "wires": [ [ - "ff3fd036.814d8", - "5230c2e.d12123c" + "47c9e5d66b827b3c" ] ] }, { - "id": "cf32e234.47719", - "type": "switch", - "z": "99804b5f.9adb6", - "name": "exclude light", - "property": "payload.entity_id", + "id": "47c9e5d66b827b3c", + "type": "join", + "z": "b13ca13c.9328e", + "g": "1b05fecd5ed3289b", + "name": "", + "mode": "custom", + "build": "merged", + "property": "notify", "propertyType": "msg", - "rules": [ - { - "t": "neq", - "v": "light.shellydimmer_lises_room", - "vt": "str" - } - ], - "checkall": "true", - "repair": false, - "outputs": 1, - "x": 510, - "y": 100, + "key": "topic", + "joiner": "\\n", + "joinerType": "str", + "accumulate": false, + "timeout": "", + "count": "4", + "reduceRight": false, + "reduceExp": "", + "reduceInit": "", + "reduceInitType": "", + "reduceFixup": "", + "x": 2070, + "y": 460, "wires": [ [ - "449328ad.e5c798" + "ac254d4235d71700" ] ] }, { - "id": "fb92086a.22ae98", - "type": "comment", - "z": "99804b5f.9adb6", - "name": "input requirements", - "info": "msg.alarm = off \nmsg.alarm = on", - "x": 110, - "y": 40, - "wires": [] - }, - { - "id": "b13ca13c.9328e", - "type": "tab", - "label": "security_home", - "disabled": false, - "info": "" - }, - { - "id": "37c7c59a61d38b32", - "type": "group", + "id": "ac254d4235d71700", + "type": "link out", "z": "b13ca13c.9328e", - "name": "notify two actions", - "style": { - "label": true - }, - "nodes": [ - "16bf3029dc11f50b", - "8bd6ce7359e6fe2f", - "48cae6c1e3fb0c75", - "1c8dfa7ab499ce29", - "3ad564319a62aa0f", - "3f7e2f446cdb3e90", - "66e66f9f5828f878" + "g": "1b05fecd5ed3289b", + "name": "link_out_notify_basement_ventilation", + "mode": "link", + "links": [ + "c13b2b4d87067c17", + "c4660dc11fb0e5b8" ], - "x": 1774, - "y": 159, - "w": 442, - "h": 202 + "x": 2165, + "y": 460, + "wires": [] }, { - "id": "1b05fecd5ed3289b", - "type": "group", + "id": "ab8c69e6298f0ad4", + "type": "template", "z": "b13ca13c.9328e", - "name": "notify", - "style": { - "label": true - }, - "nodes": [ - "dab28de38f3a6629", - "ab8c69e6298f0ad4", - "ac254d4235d71700", - "47c9e5d66b827b3c", - "3a0c4f886a8c4e54", - "52d10ab03d478bae" - ], - "x": 1774, - "y": 399, - "w": 432, - "h": 162 + "g": "1b05fecd5ed3289b", + "name": "title", + "field": "notify.title", + "fieldType": "msg", + "format": "handlebars", + "syntax": "mustache", + "template": "Beveiliging", + "output": "str", + "x": 1910, + "y": 440, + "wires": [ + [ + "47c9e5d66b827b3c" + ] + ] }, { - "id": "3ad564319a62aa0f", - "type": "junction", + "id": "dab28de38f3a6629", + "type": "template", "z": "b13ca13c.9328e", - "g": "37c7c59a61d38b32", - "x": 1800, - "y": 240, + "g": "1b05fecd5ed3289b", + "name": "icon", + "field": "notify.icon", + "fieldType": "msg", + "format": "handlebars", + "syntax": "mustache", + "template": "", + "output": "str", + "x": 1910, + "y": 480, "wires": [ [ - "8bd6ce7359e6fe2f", - "16bf3029dc11f50b", - "3f7e2f446cdb3e90", - "66e66f9f5828f878" + "47c9e5d66b827b3c" ] ] }, { - "id": "b2806f2a332a95dd", - "type": "junction", + "id": "66e66f9f5828f878", + "type": "template", "z": "b13ca13c.9328e", - "x": 960, - "y": 180, + "g": "37c7c59a61d38b32", + "name": "notification id", + "field": "notify.notification_id", + "fieldType": "msg", + "format": "handlebars", + "syntax": "mustache", + "template": "home_security", + "output": "str", + "x": 1910, + "y": 320, "wires": [ [ - "266c6e1c01c791a8" + "1c8dfa7ab499ce29" ] ] }, { - "id": "266c6e1c01c791a8", - "type": "junction", + "id": "3f7e2f446cdb3e90", + "type": "change", "z": "b13ca13c.9328e", - "x": 1100, - "y": 180, + "g": "37c7c59a61d38b32", + "name": "action titles", + "rules": [ + { + "t": "set", + "p": "notify.action_1_title", + "pt": "msg", + "to": "JA", + "tot": "str" + }, + { + "t": "set", + "p": "notify.action_2_title", + "pt": "msg", + "to": "NEE", + "tot": "str" + }, + { + "t": "set", + "p": "notify.action_1", + "pt": "msg", + "to": "HOME_SECURITY_OFF", + "tot": "str" + }, + { + "t": "set", + "p": "notify.action_2", + "pt": "msg", + "to": "IGNORE", + "tot": "str" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1910, + "y": 240, "wires": [ [ - "743671d6.44575" + "1c8dfa7ab499ce29" ] ] }, { - "id": "1d1ec90f6d5f3048", - "type": "junction", + "id": "1c8dfa7ab499ce29", + "type": "join", "z": "b13ca13c.9328e", - "x": 960, - "y": 160, + "g": "37c7c59a61d38b32", + "name": "", + "mode": "custom", + "build": "merged", + "property": "notify", + "propertyType": "msg", + "key": "topic", + "joiner": "\\n", + "joinerType": "str", + "accumulate": false, + "timeout": "", + "count": "8", + "reduceRight": false, + "reduceExp": "", + "reduceInit": "", + "reduceInitType": "", + "reduceFixup": "", + "x": 2090, + "y": 240, "wires": [ [ - "15e791691fffba6e" + "48cae6c1e3fb0c75" ] ] }, { - "id": "3a0c4f886a8c4e54", - "type": "junction", + "id": "48cae6c1e3fb0c75", + "type": "link out", "z": "b13ca13c.9328e", - "g": "1b05fecd5ed3289b", - "x": 1800, - "y": 460, + "g": "37c7c59a61d38b32", + "name": "link_out_notify_guest_mode", + "mode": "link", + "links": [ + "c76d311bb4b6991b", + "d1753081ba6b4004" + ], + "x": 2175, + "y": 240, + "wires": [] + }, + { + "id": "8bd6ce7359e6fe2f", + "type": "template", + "z": "b13ca13c.9328e", + "g": "37c7c59a61d38b32", + "name": "title", + "field": "notify.title", + "fieldType": "msg", + "format": "handlebars", + "syntax": "mustache", + "template": "Beveiliging", + "output": "str", + "x": 1890, + "y": 200, "wires": [ [ - "ab8c69e6298f0ad4", - "dab28de38f3a6629", - "52d10ab03d478bae" + "1c8dfa7ab499ce29" ] ] }, { - "id": "15e791691fffba6e", - "type": "junction", + "id": "16bf3029dc11f50b", + "type": "template", "z": "b13ca13c.9328e", - "x": 1480, - "y": 160, + "g": "37c7c59a61d38b32", + "name": "icon", + "field": "notify.icon", + "fieldType": "msg", + "format": "handlebars", + "syntax": "mustache", + "template": "", + "output": "str", + "x": 1890, + "y": 280, "wires": [ [ - "40140a3.8383df4", - "668b5737b0f584a7" + "1c8dfa7ab499ce29" ] ] }, @@ -1147,277 +1043,56 @@ "name": "message", "field": "notify.message", "fieldType": "msg", - "format": "handlebars", - "syntax": "mustache", - "template": "De {{door}} is geopend met beveiliging aan. Beveiliging uitschakelen?", - "output": "str", - "x": 1660, - "y": 160, - "wires": [ - [ - "3ad564319a62aa0f" - ] - ] - }, - { - "id": "4dbc6d3c.6b1e94", - "type": "change", - "z": "b13ca13c.9328e", - "name": "", - "rules": [ - { - "t": "set", - "p": "door", - "pt": "msg", - "to": "voordeur", - "tot": "str" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 270, - "y": 60, - "wires": [ - [ - "9b797c1b.4dc83" - ] - ] - }, - { - "id": "2231c04d.678c4", - "type": "change", - "z": "b13ca13c.9328e", - "name": "", - "rules": [ - { - "t": "set", - "p": "door", - "pt": "msg", - "to": "achterdeur", - "tot": "str" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 270, - "y": 160, - "wires": [ - [ - "9b797c1b.4dc83" - ] - ] - }, - { - "id": "e3f16390.e04ac", - "type": "change", - "z": "b13ca13c.9328e", - "name": "", - "rules": [ - { - "t": "set", - "p": "topic", - "pt": "msg", - "to": "Huis beveiliging", - "tot": "str" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 570, - "y": 60, - "wires": [ - [ - "5930459.94035bc" - ] - ] - }, - { - "id": "32df022c.a85eb6", - "type": "server-state-changed", - "z": "b13ca13c.9328e", - "name": "state alarm", - "server": "4ba92433.2478cc", - "version": 5, - "outputs": 1, - "exposeAsEntityConfig": "", - "entityId": "input_boolean.alarm", - "entityIdType": "exact", - "outputInitially": false, - "stateType": "str", - "ifState": "", - "ifStateType": "str", - "ifStateOperator": "is", - "outputOnlyOnStateChange": false, - "for": "", - "forType": "num", - "forUnits": "minutes", - "ignorePrevStateNull": false, - "ignorePrevStateUnknown": true, - "ignorePrevStateUnavailable": true, - "ignoreCurrentStateUnknown": true, - "ignoreCurrentStateUnavailable": true, - "outputProperties": [ - { - "property": "alarm", - "propertyType": "msg", - "value": "", - "valueType": "entityState" - } - ], - "x": 80, - "y": 400, - "wires": [ - [ - "17fc6f2f.1f2ff9" - ] - ] - }, - { - "id": "726bf481.1a702c", - "type": "comment", - "z": "b13ca13c.9328e", - "name": "restore lights state after alarm", - "info": "", - "x": 160, - "y": 360, - "wires": [] - }, - { - "id": "17fc6f2f.1f2ff9", - "type": "subflow:99804b5f.9adb6", - "z": "b13ca13c.9328e", - "name": "alarm lights", - "env": [], - "x": 250, - "y": 400, - "wires": [] - }, - { - "id": "16bf3029dc11f50b", - "type": "template", - "z": "b13ca13c.9328e", - "g": "37c7c59a61d38b32", - "name": "icon", - "field": "notify.icon", - "fieldType": "msg", - "format": "handlebars", - "syntax": "mustache", - "template": "", - "output": "str", - "x": 1890, - "y": 280, - "wires": [ - [ - "1c8dfa7ab499ce29" - ] - ] - }, - { - "id": "8bd6ce7359e6fe2f", - "type": "template", - "z": "b13ca13c.9328e", - "g": "37c7c59a61d38b32", - "name": "title", - "field": "notify.title", - "fieldType": "msg", - "format": "handlebars", - "syntax": "mustache", - "template": "Beveiliging", - "output": "str", - "x": 1890, - "y": 200, - "wires": [ - [ - "1c8dfa7ab499ce29" - ] - ] - }, - { - "id": "48cae6c1e3fb0c75", - "type": "link out", - "z": "b13ca13c.9328e", - "g": "37c7c59a61d38b32", - "name": "link_out_notify_guest_mode", - "mode": "link", - "links": [ - "c76d311bb4b6991b", - "d1753081ba6b4004" - ], - "x": 2175, - "y": 240, - "wires": [] - }, - { - "id": "1c8dfa7ab499ce29", - "type": "join", - "z": "b13ca13c.9328e", - "g": "37c7c59a61d38b32", - "name": "", - "mode": "custom", - "build": "merged", - "property": "notify", - "propertyType": "msg", - "key": "topic", - "joiner": "\\n", - "joinerType": "str", - "accumulate": false, - "timeout": "", - "count": "8", - "reduceRight": false, - "reduceExp": "", - "reduceInit": "", - "reduceInitType": "", - "reduceFixup": "", - "x": 2090, - "y": 240, + "format": "handlebars", + "syntax": "mustache", + "template": "De {{door}} is geopend met beveiliging aan. Beveiliging uitschakelen?", + "output": "str", + "x": 1660, + "y": 160, "wires": [ [ - "48cae6c1e3fb0c75" + "3ad564319a62aa0f" ] ] }, { - "id": "3f7e2f446cdb3e90", + "id": "4dbc6d3c.6b1e94", "type": "change", "z": "b13ca13c.9328e", - "g": "37c7c59a61d38b32", - "name": "action titles", + "name": "", "rules": [ { "t": "set", - "p": "notify.action_1_title", - "pt": "msg", - "to": "JA", - "tot": "str" - }, - { - "t": "set", - "p": "notify.action_2_title", - "pt": "msg", - "to": "NEE", - "tot": "str" - }, - { - "t": "set", - "p": "notify.action_1", + "p": "door", "pt": "msg", - "to": "HOME_SECURITY_OFF", + "to": "voordeur", "tot": "str" - }, + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 270, + "y": 60, + "wires": [ + [ + "9b797c1b.4dc83" + ] + ] + }, + { + "id": "2231c04d.678c4", + "type": "change", + "z": "b13ca13c.9328e", + "name": "", + "rules": [ { "t": "set", - "p": "notify.action_2", + "p": "door", "pt": "msg", - "to": "IGNORE", + "to": "achterdeur", "tot": "str" } ], @@ -1426,31 +1101,38 @@ "from": "", "to": "", "reg": false, - "x": 1910, - "y": 240, + "x": 270, + "y": 160, "wires": [ [ - "1c8dfa7ab499ce29" + "9b797c1b.4dc83" ] ] }, { - "id": "66e66f9f5828f878", - "type": "template", + "id": "e3f16390.e04ac", + "type": "change", "z": "b13ca13c.9328e", - "g": "37c7c59a61d38b32", - "name": "notification id", - "field": "notify.notification_id", - "fieldType": "msg", - "format": "handlebars", - "syntax": "mustache", - "template": "home_security", - "output": "str", - "x": 1910, - "y": 320, + "name": "", + "rules": [ + { + "t": "set", + "p": "topic", + "pt": "msg", + "to": "Huis beveiliging", + "tot": "str" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 570, + "y": 60, "wires": [ [ - "1c8dfa7ab499ce29" + "5930459.94035bc" ] ] }, @@ -1461,7 +1143,7 @@ "name": "listen to action notification answer event ", "info": "", "x": 190, - "y": 460, + "y": 480, "wires": [] }, { @@ -1491,7 +1173,7 @@ ], "event_type": "", "x": 110, - "y": 500, + "y": 520, "wires": [ [ "b02d4bae2805d336" @@ -1520,152 +1202,115 @@ "outputProperties": [], "queue": "none", "x": 320, - "y": 500, + "y": 520, "wires": [ [] ] }, { - "id": "dab28de38f3a6629", + "id": "85c14e5d7384e6c6", "type": "template", "z": "b13ca13c.9328e", - "g": "1b05fecd5ed3289b", - "name": "icon", - "field": "notify.icon", + "name": "message", + "field": "notify.message", "fieldType": "msg", "format": "handlebars", "syntax": "mustache", - "template": "", + "template": "Het alarm gaat af! Schakel beveiliging uit in Home Assistant.", "output": "str", - "x": 1910, - "y": 480, + "x": 1660, + "y": 380, "wires": [ [ - "47c9e5d66b827b3c" + "3a0c4f886a8c4e54" ] ] }, { - "id": "ab8c69e6298f0ad4", + "id": "668b5737b0f584a7", "type": "template", "z": "b13ca13c.9328e", - "g": "1b05fecd5ed3289b", - "name": "title", - "field": "notify.title", + "name": "message", + "field": "notify.message", "fieldType": "msg", "format": "handlebars", "syntax": "mustache", - "template": "Beveiliging", + "template": "De {{door}} is geopend met beveiliging aan, schakel beveiliging uit in Home Assistant.", "output": "str", - "x": 1910, - "y": 440, + "x": 1660, + "y": 300, "wires": [ [ - "47c9e5d66b827b3c" + "3a0c4f886a8c4e54" ] ] }, { - "id": "ac254d4235d71700", - "type": "link out", + "id": "e19d09cced81d589", + "type": "server-state-changed", "z": "b13ca13c.9328e", - "g": "1b05fecd5ed3289b", - "name": "link_out_notify_basement_ventilation", - "mode": "link", - "links": [ - "c13b2b4d87067c17", - "c4660dc11fb0e5b8" + "name": "alarm is on", + "server": "4ba92433.2478cc", + "version": 5, + "outputs": 2, + "exposeAsEntityConfig": "", + "entityId": "input_boolean.alarm", + "entityIdType": "exact", + "outputInitially": false, + "stateType": "str", + "ifState": "on", + "ifStateType": "str", + "ifStateOperator": "is", + "outputOnlyOnStateChange": true, + "for": "0", + "forType": "num", + "forUnits": "minutes", + "ignorePrevStateNull": true, + "ignorePrevStateUnknown": true, + "ignorePrevStateUnavailable": true, + "ignoreCurrentStateUnknown": true, + "ignoreCurrentStateUnavailable": true, + "outputProperties": [ + { + "property": "alarm", + "propertyType": "msg", + "value": "", + "valueType": "entityState" + } ], - "x": 2165, - "y": 460, - "wires": [] - }, - { - "id": "47c9e5d66b827b3c", - "type": "join", - "z": "b13ca13c.9328e", - "g": "1b05fecd5ed3289b", - "name": "", - "mode": "custom", - "build": "merged", - "property": "notify", - "propertyType": "msg", - "key": "topic", - "joiner": "\\n", - "joinerType": "str", - "accumulate": false, - "timeout": "", - "count": "4", - "reduceRight": false, - "reduceExp": "", - "reduceInit": "", - "reduceInitType": "", - "reduceFixup": "", - "x": 2070, - "y": 460, + "x": 80, + "y": 400, "wires": [ [ - "ac254d4235d71700" - ] - ] - }, - { - "id": "52d10ab03d478bae", - "type": "template", - "z": "b13ca13c.9328e", - "g": "1b05fecd5ed3289b", - "name": "notification id", - "field": "notify.notification_id", - "fieldType": "msg", - "format": "handlebars", - "syntax": "mustache", - "template": "", - "output": "str", - "x": 1930, - "y": 520, - "wires": [ + "5874beb71c3c9523" + ], [ - "47c9e5d66b827b3c" + "5874beb71c3c9523" ] ] }, { - "id": "85c14e5d7384e6c6", - "type": "template", + "id": "90650fd4618583b4", + "type": "comment", "z": "b13ca13c.9328e", - "name": "message", - "field": "notify.message", - "fieldType": "msg", - "format": "handlebars", - "syntax": "mustache", - "template": "Het alarm gaat af! Schakel beveiliging uit in Home Assistant.", - "output": "str", - "x": 1660, - "y": 380, - "wires": [ - [ - "3a0c4f886a8c4e54" - ] - ] + "name": "turn on lights when alarm is on", + "info": "", + "x": 160, + "y": 360, + "wires": [] }, { - "id": "668b5737b0f584a7", - "type": "template", + "id": "5874beb71c3c9523", + "type": "link out", "z": "b13ca13c.9328e", - "name": "message", - "field": "notify.message", - "fieldType": "msg", - "format": "handlebars", - "syntax": "mustache", - "template": "De {{door}} is geopend met beveiliging aan, schakel beveiliging uit in Home Assistant.", - "output": "str", - "x": 1660, - "y": 300, - "wires": [ - [ - "3a0c4f886a8c4e54" - ] - ] + "name": "security_home", + "mode": "link", + "links": [ + "43cbfb522e72cbe5" + ], + "x": 185, + "y": 400, + "wires": [] }, { "id": "4ba92433.2478cc", diff --git a/src/data/flows/smoke_co_alarm.json b/src/data/flows/security_smoke_co.json similarity index 74% rename from src/data/flows/smoke_co_alarm.json rename to src/data/flows/security_smoke_co.json index 2075b50..67ff017 100644 --- a/src/data/flows/smoke_co_alarm.json +++ b/src/data/flows/security_smoke_co.json @@ -1,369 +1,8 @@ [ - { - "id": "99804b5f.9adb6", - "type": "subflow", - "name": "alarm lights", - "info": "", - "category": "", - "in": [ - { - "x": 40, - "y": 100, - "wires": [ - { - "id": "fd745c51.01fc5" - } - ] - } - ], - "out": [], - "env": [], - "color": "#DDAA99" - }, - { - "id": "af7b80fc.c3023", - "type": "api-call-service", - "z": "99804b5f.9adb6", - "name": "restore light on state", - "server": "4ba92433.2478cc", - "version": 5, - "debugenabled": false, - "domain": "", - "service": "turn_on", - "areaId": [], - "deviceId": [], - "entityId": [ - "{{payload.entity_id}}" - ], - "data": "{\"brightness\":\"{{payload.attributes.brightness}}\"}", - "dataType": "json", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 1160, - "y": 160, - "wires": [ - [] - ] - }, - { - "id": "bcb3a700.ce17f8", - "type": "ha-get-entities", - "z": "99804b5f.9adb6", - "name": "get all lights", - "server": "4ba92433.2478cc", - "version": 1, - "rules": [ - { - "property": "entity_id", - "logic": "starts_with", - "value": "light.shelly", - "valueType": "str" - } - ], - "outputType": "split", - "outputEmptyResults": false, - "outputLocationType": "msg", - "outputLocation": "payload", - "outputResultsCount": 1, - "x": 330, - "y": 100, - "wires": [ - [ - "cf32e234.47719", - "fc63001e.69dc4" - ] - ] - }, - { - "id": "5230c2e.d12123c", - "type": "switch", - "z": "99804b5f.9adb6", - "name": "on / off", - "property": "payload.state", - "propertyType": "msg", - "rules": [ - { - "t": "eq", - "v": "on", - "vt": "str" - }, - { - "t": "eq", - "v": "off", - "vt": "str" - } - ], - "checkall": "true", - "repair": false, - "outputs": 2, - "x": 950, - "y": 180, - "wires": [ - [ - "af7b80fc.c3023" - ], - [ - "e15ce8b1.b6e1b8" - ] - ] - }, - { - "id": "e15ce8b1.b6e1b8", - "type": "api-call-service", - "z": "99804b5f.9adb6", - "name": "restore light off state", - "server": "4ba92433.2478cc", - "version": 5, - "debugenabled": false, - "domain": "{{payload.domain}}", - "service": "turn_off", - "areaId": [], - "deviceId": [], - "entityId": [ - "{{payload.entity_id}}" - ], - "data": "", - "dataType": "json", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 1160, - "y": 200, - "wires": [ - [] - ] - }, - { - "id": "ff3fd036.814d8", - "type": "delay", - "z": "99804b5f.9adb6", - "name": "", - "pauseType": "delay", - "timeout": "5", - "timeoutUnits": "seconds", - "rate": "1", - "nbRateUnits": "1", - "rateUnits": "second", - "randomFirst": "1", - "randomLast": "5", - "randomUnits": "seconds", - "drop": false, - "outputs": 1, - "x": 740, - "y": 280, - "wires": [ - [ - "c6fb625.0c939a" - ] - ] - }, - { - "id": "c6fb625.0c939a", - "type": "change", - "z": "99804b5f.9adb6", - "name": "send red to traffic", - "rules": [ - { - "t": "set", - "p": "payload", - "pt": "msg", - "to": "red", - "tot": "str" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 910, - "y": 280, - "wires": [ - [ - "b3c56923.a20108" - ] - ] - }, - { - "id": "fc63001e.69dc4", - "type": "change", - "z": "99804b5f.9adb6", - "name": "set domain to light", - "rules": [ - { - "t": "set", - "p": "payload.domain", - "pt": "msg", - "to": "light", - "tot": "str" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 530, - "y": 140, - "wires": [ - [ - "b3c56923.a20108" - ] - ] - }, - { - "id": "952a70ca.b8532", - "type": "change", - "z": "99804b5f.9adb6", - "name": "send green to traffic", - "rules": [ - { - "t": "set", - "p": "payload", - "pt": "msg", - "to": "green", - "tot": "str" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 530, - "y": 180, - "wires": [ - [ - "b3c56923.a20108" - ] - ] - }, - { - "id": "fd745c51.01fc5", - "type": "switch", - "z": "99804b5f.9adb6", - "name": "", - "property": "alarm", - "propertyType": "msg", - "rules": [ - { - "t": "eq", - "v": "on", - "vt": "str" - }, - { - "t": "eq", - "v": "off", - "vt": "str" - } - ], - "checkall": "true", - "repair": false, - "outputs": 2, - "x": 150, - "y": 100, - "wires": [ - [ - "bcb3a700.ce17f8" - ], - [ - "952a70ca.b8532" - ] - ] - }, - { - "id": "449328ad.e5c798", - "type": "api-call-service", - "z": "99804b5f.9adb6", - "name": "turn on all lights", - "server": "4ba92433.2478cc", - "version": 5, - "debugenabled": false, - "domain": "light", - "service": "turn_on", - "areaId": [], - "deviceId": [], - "entityId": [], - "data": "{\"entity_id\":\"{{payload.entity_id}}\",\"brightness\":255}", - "dataType": "json", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 1140, - "y": 100, - "wires": [ - [] - ] - }, - { - "id": "b3c56923.a20108", - "type": "traffic", - "z": "99804b5f.9adb6", - "name": "traffic", - "property_allow": "payload", - "filter_allow": "green", - "ignore_case_allow": false, - "negate_allow": false, - "send_allow": false, - "property_stop": "payload", - "filter_stop": "red", - "ignore_case_stop": false, - "negate_stop": false, - "send_stop": false, - "default_start": false, - "differ": true, - "x": 730, - "y": 180, - "wires": [ - [ - "ff3fd036.814d8", - "5230c2e.d12123c" - ] - ] - }, - { - "id": "cf32e234.47719", - "type": "switch", - "z": "99804b5f.9adb6", - "name": "exclude light", - "property": "payload.entity_id", - "propertyType": "msg", - "rules": [ - { - "t": "neq", - "v": "light.shellydimmer_lises_room", - "vt": "str" - } - ], - "checkall": "true", - "repair": false, - "outputs": 1, - "x": 510, - "y": 100, - "wires": [ - [ - "449328ad.e5c798" - ] - ] - }, - { - "id": "fb92086a.22ae98", - "type": "comment", - "z": "99804b5f.9adb6", - "name": "input requirements", - "info": "msg.alarm = off \nmsg.alarm = on", - "x": 110, - "y": 40, - "wires": [] - }, { "id": "cde79c08.e4f488", "type": "tab", - "label": "smoke_co_alarm", + "label": "security_smoke_co", "disabled": false, "info": "" }, @@ -404,19 +43,19 @@ ] }, { - "id": "c7b88c5f533c105b", + "id": "af6a4d51c1e99b4e", "type": "template", "z": "cde79c08.e4f488", "g": "60a8ffbec987c377", - "name": "notification id", - "field": "notify.notification_id", + "name": "icon", + "field": "notify.icon", "fieldType": "msg", "format": "handlebars", "syntax": "mustache", - "template": "firealarm", + "template": "", "output": "str", - "x": 970, - "y": 260, + "x": 950, + "y": 220, "wires": [ [ "9a02e08c1760e584" @@ -424,31 +63,22 @@ ] }, { - "id": "9a02e08c1760e584", - "type": "join", + "id": "8bda876328e49e67", + "type": "template", "z": "cde79c08.e4f488", "g": "60a8ffbec987c377", - "name": "", - "mode": "custom", - "build": "merged", - "property": "notify", - "propertyType": "msg", - "key": "topic", - "joiner": "\\n", - "joinerType": "str", - "accumulate": false, - "timeout": "", - "count": "4", - "reduceRight": false, - "reduceExp": "", - "reduceInit": "", - "reduceInitType": "", - "reduceFixup": "", - "x": 1110, - "y": 200, + "name": "title", + "field": "notify.title", + "fieldType": "msg", + "format": "handlebars", + "syntax": "mustache", + "template": "Alarm", + "output": "str", + "x": 950, + "y": 180, "wires": [ [ - "fdba7cd037a9da5a" + "9a02e08c1760e584" ] ] }, @@ -469,39 +99,48 @@ "wires": [] }, { - "id": "8bda876328e49e67", - "type": "template", + "id": "9a02e08c1760e584", + "type": "join", "z": "cde79c08.e4f488", "g": "60a8ffbec987c377", - "name": "title", - "field": "notify.title", - "fieldType": "msg", - "format": "handlebars", - "syntax": "mustache", - "template": "Alarm", - "output": "str", - "x": 950, - "y": 180, + "name": "", + "mode": "custom", + "build": "merged", + "property": "notify", + "propertyType": "msg", + "key": "topic", + "joiner": "\\n", + "joinerType": "str", + "accumulate": false, + "timeout": "", + "count": "4", + "reduceRight": false, + "reduceExp": "", + "reduceInit": "", + "reduceInitType": "", + "reduceFixup": "", + "x": 1110, + "y": 200, "wires": [ [ - "9a02e08c1760e584" + "fdba7cd037a9da5a" ] ] }, { - "id": "af6a4d51c1e99b4e", + "id": "c7b88c5f533c105b", "type": "template", "z": "cde79c08.e4f488", "g": "60a8ffbec987c377", - "name": "icon", - "field": "notify.icon", + "name": "notification id", + "field": "notify.notification_id", "fieldType": "msg", "format": "handlebars", "syntax": "mustache", - "template": "", + "template": "firealarm", "output": "str", - "x": 950, - "y": 220, + "x": 970, + "y": 260, "wires": [ [ "9a02e08c1760e584" @@ -666,7 +305,7 @@ "y": 420, "wires": [ [ - "b64a8e86.d9fa8" + "e426c9cc0865f723" ] ] }, @@ -833,16 +472,6 @@ ] ] }, - { - "id": "b64a8e86.d9fa8", - "type": "subflow:99804b5f.9adb6", - "z": "cde79c08.e4f488", - "name": "", - "env": [], - "x": 1190, - "y": 440, - "wires": [] - }, { "id": "8f9a86a6.9ca938", "type": "switch", @@ -900,7 +529,7 @@ "y": 460, "wires": [ [ - "b64a8e86.d9fa8" + "e426c9cc0865f723" ] ] }, @@ -1321,6 +950,17 @@ ] ] }, + { + "id": "e426c9cc0865f723", + "type": "link out", + "z": "cde79c08.e4f488", + "name": "smoke_co_alarm", + "mode": "link", + "links": [], + "x": 1125, + "y": 440, + "wires": [] + }, { "id": "4ba92433.2478cc", "type": "server", diff --git a/src/data/subflows/alarm lights.json b/src/data/subflows/alarm lights.json deleted file mode 100644 index 80d6c71..0000000 --- a/src/data/subflows/alarm lights.json +++ /dev/null @@ -1,386 +0,0 @@ -[ - { - "id": "99804b5f.9adb6", - "type": "subflow", - "name": "alarm lights", - "info": "", - "category": "", - "in": [ - { - "x": 40, - "y": 100, - "wires": [ - { - "id": "fd745c51.01fc5" - } - ] - } - ], - "out": [], - "env": [], - "color": "#DDAA99" - }, - { - "id": "af7b80fc.c3023", - "type": "api-call-service", - "z": "99804b5f.9adb6", - "name": "restore light on state", - "server": "4ba92433.2478cc", - "version": 5, - "debugenabled": false, - "domain": "", - "service": "turn_on", - "areaId": [], - "deviceId": [], - "entityId": [ - "{{payload.entity_id}}" - ], - "data": "{\"brightness\":\"{{payload.attributes.brightness}}\"}", - "dataType": "json", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 1160, - "y": 160, - "wires": [ - [] - ] - }, - { - "id": "bcb3a700.ce17f8", - "type": "ha-get-entities", - "z": "99804b5f.9adb6", - "name": "get all lights", - "server": "4ba92433.2478cc", - "version": 0, - "rules": [ - { - "property": "entity_id", - "logic": "starts_with", - "value": "light.shelly", - "valueType": "str" - } - ], - "output_type": "split", - "output_empty_results": false, - "output_location_type": "msg", - "output_location": "payload", - "output_results_count": 1, - "x": 330, - "y": 100, - "wires": [ - [ - "cf32e234.47719", - "fc63001e.69dc4" - ] - ] - }, - { - "id": "5230c2e.d12123c", - "type": "switch", - "z": "99804b5f.9adb6", - "name": "on / off", - "property": "payload.state", - "propertyType": "msg", - "rules": [ - { - "t": "eq", - "v": "on", - "vt": "str" - }, - { - "t": "eq", - "v": "off", - "vt": "str" - } - ], - "checkall": "true", - "repair": false, - "outputs": 2, - "x": 950, - "y": 180, - "wires": [ - [ - "af7b80fc.c3023" - ], - [ - "e15ce8b1.b6e1b8" - ] - ] - }, - { - "id": "e15ce8b1.b6e1b8", - "type": "api-call-service", - "z": "99804b5f.9adb6", - "name": "restore light off state", - "server": "4ba92433.2478cc", - "version": 5, - "debugenabled": false, - "domain": "{{payload.domain}}", - "service": "turn_off", - "areaId": [], - "deviceId": [], - "entityId": [ - "{{payload.entity_id}}" - ], - "data": "", - "dataType": "json", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 1160, - "y": 200, - "wires": [ - [] - ] - }, - { - "id": "ff3fd036.814d8", - "type": "delay", - "z": "99804b5f.9adb6", - "name": "", - "pauseType": "delay", - "timeout": "5", - "timeoutUnits": "seconds", - "rate": "1", - "nbRateUnits": "1", - "rateUnits": "second", - "randomFirst": "1", - "randomLast": "5", - "randomUnits": "seconds", - "drop": false, - "outputs": 1, - "x": 740, - "y": 280, - "wires": [ - [ - "c6fb625.0c939a" - ] - ] - }, - { - "id": "c6fb625.0c939a", - "type": "change", - "z": "99804b5f.9adb6", - "name": "send red to traffic", - "rules": [ - { - "t": "set", - "p": "payload", - "pt": "msg", - "to": "red", - "tot": "str" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 910, - "y": 280, - "wires": [ - [ - "b3c56923.a20108" - ] - ] - }, - { - "id": "fc63001e.69dc4", - "type": "change", - "z": "99804b5f.9adb6", - "name": "set domain to light", - "rules": [ - { - "t": "set", - "p": "payload.domain", - "pt": "msg", - "to": "light", - "tot": "str" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 530, - "y": 140, - "wires": [ - [ - "b3c56923.a20108" - ] - ] - }, - { - "id": "952a70ca.b8532", - "type": "change", - "z": "99804b5f.9adb6", - "name": "send green to traffic", - "rules": [ - { - "t": "set", - "p": "payload", - "pt": "msg", - "to": "green", - "tot": "str" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 530, - "y": 180, - "wires": [ - [ - "b3c56923.a20108" - ] - ] - }, - { - "id": "fd745c51.01fc5", - "type": "switch", - "z": "99804b5f.9adb6", - "name": "", - "property": "alarm", - "propertyType": "msg", - "rules": [ - { - "t": "eq", - "v": "on", - "vt": "str" - }, - { - "t": "eq", - "v": "off", - "vt": "str" - } - ], - "checkall": "true", - "repair": false, - "outputs": 2, - "x": 150, - "y": 100, - "wires": [ - [ - "bcb3a700.ce17f8" - ], - [ - "952a70ca.b8532" - ] - ] - }, - { - "id": "449328ad.e5c798", - "type": "api-call-service", - "z": "99804b5f.9adb6", - "name": "turn on all lights", - "server": "4ba92433.2478cc", - "version": 5, - "debugenabled": false, - "domain": "light", - "service": "turn_on", - "areaId": [], - "deviceId": [], - "entityId": [], - "data": "{\"entity_id\":\"{{payload.entity_id}}\",\"brightness\":255}", - "dataType": "json", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "x": 1140, - "y": 100, - "wires": [ - [] - ] - }, - { - "id": "b3c56923.a20108", - "type": "traffic", - "z": "99804b5f.9adb6", - "name": "traffic", - "property_allow": "payload", - "filter_allow": "green", - "ignore_case_allow": false, - "negate_allow": false, - "send_allow": false, - "property_stop": "payload", - "filter_stop": "red", - "ignore_case_stop": false, - "negate_stop": false, - "send_stop": false, - "default_start": false, - "differ": true, - "x": 730, - "y": 180, - "wires": [ - [ - "ff3fd036.814d8", - "5230c2e.d12123c" - ] - ] - }, - { - "id": "cf32e234.47719", - "type": "switch", - "z": "99804b5f.9adb6", - "name": "exclude light", - "property": "payload.entity_id", - "propertyType": "msg", - "rules": [ - { - "t": "neq", - "v": "light.shellydimmer_lises_room", - "vt": "str" - } - ], - "checkall": "true", - "repair": false, - "outputs": 1, - "x": 510, - "y": 100, - "wires": [ - [ - "449328ad.e5c798" - ] - ] - }, - { - "id": "fb92086a.22ae98", - "type": "comment", - "z": "99804b5f.9adb6", - "name": "input requirements", - "info": "msg.alarm = off \nmsg.alarm = on", - "x": 110, - "y": 40, - "wires": [] - }, - { - "id": "4ba92433.2478cc", - "type": "server", - "name": "Home Assistant", - "version": 5, - "addon": false, - "rejectUnauthorizedCerts": false, - "ha_boolean": "y|yes|true|on|home|open", - "connectionDelay": true, - "cacheJson": true, - "heartbeat": true, - "heartbeatInterval": "30", - "areaSelector": "id", - "deviceSelector": "id", - "entitySelector": "id", - "statusSeparator": "at: ", - "statusYear": "hidden", - "statusMonth": "short", - "statusDay": "numeric", - "statusHourCycle": "h23", - "statusTimeFormat": "h:m", - "enableGlobalContextStore": true - } -] \ No newline at end of file