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'