diff --git a/.HA_VERSION b/.HA_VERSION index 983a07e4..286cb4dc 100755 --- a/.HA_VERSION +++ b/.HA_VERSION @@ -1 +1 @@ -0.33.1 \ No newline at end of file +0.33.3 \ No newline at end of file diff --git a/Misc Stuff.md b/Misc Stuff.md index 79d99990..ec376db7 100755 --- a/Misc Stuff.md +++ b/Misc Stuff.md @@ -1,4 +1,6 @@ +https://i.imgur.com/xy10yI1.png + - alias: 'Get Random Time' trigger: platform: time @@ -42,7 +44,12 @@ action: brightness: 255 - + - platform: template + sensors: + front_door_clean: + value_template: '{% if is_state("binary_sensor.front_door", "on") %}Open{% else %}Closed{% endif %}' + friendly_name: 'Front Door' + entity_id: binary_sensor.front_door # Template Binary Sensors platform: template @@ -56,3 +63,76 @@ sensors: {% else %} n/a {% endif %} + + +Using Slider_Booleans to store data and restore it after. + +https://community.home-assistant.io/t/brighten-front-porch-lights-then-return-to-recorded-dim-level/6641 + +input_slider: + porch_brightness: + name: Front Porch Brightness + initial: 25 + min: 0 + max: 255 + step: 1 + +script: + record_front_porch: + alias: Record front porch status to slider + sequence: + - service: input_slider.select_value + data_template: + entity_id: input_slider.porch_brightness + value: '{% if states.light.front_porch_light_level_32_0.state == "off" %}0{% else %}{{states.light.front_porch_light_level_32_0.attributes.brightness}}{% endif %}' + + return_front_porch: + alias: Return front porch to recorded value + sequence: + - service: light.turn_on + entity_id: light.front_porch_light_level_32_0 + data_template: + brightness: '{{states.input_slider.porch_brightness.state | int}}' + - service: input_boolean.turn_off + entity_id: input_boolean.front_porch_motion_light_active + + return_front_porch_delayed: + alias: Wait 5 min and then return front porch to recorded value + sequence: + - delay: + minutes: 5 + - service: script.return_front_porch + +automation: + - alias: Motion ON front porch + trigger: + # if motion is ON - this is triggered via IFTTT and Arlo + - platform: state + entity_id: input_boolean.motion_front_porch + to: 'on' + from: 'off' + action: + # some notifications + - service: notify.scott_notifier + data: + message: "Motion front porch" + title: "Front Porch" + data: + priority: 0 + - service: notify.kodi + data: + message: "Motion front porch" + title: "Front Porch" + # only at night + - condition: state + entity_id: sun.sun + state: 'below_horizon' + #remember the state of front porch + - service: script.record_front_porch + # turn the light on + - service: light.turn_on + entity_id: light.front_porch_light_level_32_0 + data: + brightness: 255 + # script with a delay that'll reset light in 5 min + - service: script.return_front_porch_delayed diff --git a/README.md b/README.md index c2cc8f22..3646f411 100755 --- a/README.md +++ b/README.md @@ -54,6 +54,7 @@ Software on the Pi : [Home Assistant](https://home-assistant.io/) , [Dasher](htt * AutoIt script to control lights via REST and also auto light office when I am working on Laptop. * Notifications and Close garage doors if left open after 9 or 10 PM. +* Monitor the reflection rates of Garadget and notify when they being to drop too low when closed (indicating a shift in the controller) * Configure the Alexa Component. * Turn on Accent lights when TV is sensed on. * Put Dash Buttons out there. diff --git a/automation/dash_buttons.yaml b/automation/dash_buttons.yaml new file mode 100755 index 00000000..3d9e3227 --- /dev/null +++ b/automation/dash_buttons.yaml @@ -0,0 +1,33 @@ +################################### +## Press a dash Button and then stuff happens. +################################### + +- alias: 'Toggle Office Light on if off' + trigger: + - platform: event + event_type: brooklyn_dash + + condition: + - condition: state + entity_id: light.office_lamp + state: 'off' + + action: + - service: light.turn_on + entity_id: light.office_lamp + + +- alias: 'Toggle Office Light off if on' + trigger: + - platform: event + event_type: brooklyn_dash + + condition: + - condition: state + entity_id: light.office_lamp + state: 'on' + + action: + - service: light.turn_off + entity_id: light.office_lamp + \ No newline at end of file diff --git a/configuration.yaml b/configuration.yaml index 4064eb6d..17ac0ac8 100755 --- a/configuration.yaml +++ b/configuration.yaml @@ -13,6 +13,7 @@ http: ssl_key: !secret ssl_key trusted_networks: - 192.168.10.0/24 + - 127.0.0.1 frontend: panel_iframe: @@ -87,7 +88,7 @@ media_player: cover: platform: garadget covers: - 3c003a001151353338363333: + !secret garadget_id: username: !secret garadget_username password: !secret garadget_password name: Garadget Large diff --git a/group/garage.yaml b/group/garage.yaml index ca8dd77f..917ff77b 100755 --- a/group/garage.yaml +++ b/group/garage.yaml @@ -5,7 +5,9 @@ garage_doors: - sensor.garadget_large_status - sensor.garadget_large_time_in_state - sensor.garadget_large_wifi_signal_strength + - sensor.garadget_large_reflection_rate - cover.garadget_small - sensor.garadget_small_status - sensor.garadget_small_time_in_state - - sensor.garadget_small_wifi_signal_strength \ No newline at end of file + - sensor.garadget_small_wifi_signal_strength + - sensor.garadget_small_reflection_rate \ No newline at end of file diff --git a/automation/switches.yaml b/group/switches.yaml similarity index 100% rename from automation/switches.yaml rename to group/switches.yaml diff --git a/sensor/garadget.yaml b/sensor/garadget.yaml index d3d045cf..0861e8ba 100755 --- a/sensor/garadget.yaml +++ b/sensor/garadget.yaml @@ -10,6 +10,10 @@ friendly_name: 'WiFi strength' value_template: '{{ states.cover.garadget_small.attributes["wifi signal strength (dB)"] }}' unit_of_measurement: 'dB' + garadget_small_reflection_rate: + friendly_name: 'Reflection Rate' + value_template: '{{ states.cover.garadget_small.attributes["sensor reflection rate"] }}' + - platform: template sensors: @@ -22,4 +26,7 @@ garadget_large_wifi_signal_strength: friendly_name: 'WiFi strength' value_template: '{{ states.cover.garadget_large.attributes["wifi signal strength (dB)"] }}' - unit_of_measurement: 'dB' \ No newline at end of file + unit_of_measurement: 'dB' + garadget_large_reflection_rate: + friendly_name: 'Reflection Rate' + value_template: '{{ states.cover.garadget_large.attributes["sensor reflection rate"] }}' \ No newline at end of file