From c0e72aafabdf18f440bf6f84982dcf72192f0856 Mon Sep 17 00:00:00 2001 From: golles Date: Sun, 17 Nov 2024 21:14:51 +0000 Subject: [PATCH] Remove dlink day/night automation and script --- custom_scripts/dlink_day_night.sh | 23 ------------------- packages/cameras.yaml | 37 ------------------------------- 2 files changed, 60 deletions(-) delete mode 100755 custom_scripts/dlink_day_night.sh delete mode 100644 packages/cameras.yaml diff --git a/custom_scripts/dlink_day_night.sh b/custom_scripts/dlink_day_night.sh deleted file mode 100755 index 1ef0ba2..0000000 --- a/custom_scripts/dlink_day_night.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env bash - -set_day_night_mode () { - # $1 = host - # $2 = username - # $3 = password - # $4 = mode: day | night | auto - - # 0=Auto, 1=Manual, 2=Always Day Mode, 3=Always Night Mode, 4=Day Mode Schedule - MODE=0 - case $4 in - day) - MODE=2 - ;; - night) - MODE=3 - ;; - esac - - curl -s --user $2:$3 http://$1/setDayNightMode --referer http://$1 --data "DayNightMode=$MODE&ReplySuccessPage=night.htm&ReplyErrorPage=errrnght.htm&ConfigDayNightMode=Save" >/dev/null 2>&1 -} - -set_day_night_mode $1 $2 $3 $4 diff --git a/packages/cameras.yaml b/packages/cameras.yaml deleted file mode 100644 index 23b6879..0000000 --- a/packages/cameras.yaml +++ /dev/null @@ -1,37 +0,0 @@ -automation: - - id: dlink_auto_day_night_mode - alias: Automatisch Dlink camera in day of night mode zetten - mode: single - triggers: - - trigger: numeric_state - entity_id: sensor.epl_eettafel_illuminance - below: 2.2 - for: - minutes: 10 - - trigger: numeric_state - entity_id: sensor.epl_eettafel_illuminance - above: 3 - for: - minutes: 10 - actions: - - choose: - - conditions: - - condition: numeric_state - entity_id: sensor.epl_eettafel_illuminance - below: 2.2 - sequence: - - action: shell_command.dlink_set_night_mode - data: - host: !secret dlink_camera_host - username: !secret dlink_camera_username - password: !secret dlink_camera_password - default: - - action: shell_command.dlink_set_day_mode - data: - host: !secret dlink_camera_host - username: !secret dlink_camera_username - password: !secret dlink_camera_password - -shell_command: - dlink_set_day_mode: '/config/custom_scripts/dlink_day_night.sh "{{ host }}" "{{ username }}" "{{ password }}" day' - dlink_set_night_mode: '/config/custom_scripts/dlink_day_night.sh "{{ host }}" "{{ username }}" "{{ password }}" night'