Check for external IP changes!

This commit is contained in:
CCOSTAN 2016-12-11 20:23:24 +00:00
parent 6d46688eb3
commit 031775ec64
4 changed files with 32 additions and 4 deletions

View File

@ -54,10 +54,8 @@ Software on the Pi : [Home Assistant](https://home-assistant.io/) , [Dasher](htt
#Todo List
* Create script/automation for staggered shutdown of switches. (Nighttime stuff)
* AutoIt script to control lights via REST and also auto light office when I am working on Laptop.
* On motion from Doorbell (IFTTT) Turn front lights to Bright White lights for 10 minutes and then back to original colors.
* 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.
* Put Dash Buttons out there.

View File

@ -41,7 +41,13 @@
brightness: 150
- service: switch.turn_on
entity_id: switch.kitchen_accents
- delay: 00:08:00
- delay: '00:00:30'
- service: switch.turn_on
- entity_id: switch.living_room_outlet
- delay: '00:00:30'
- service: switch.turn_on
entity_id: switch.foyer_outlet
- delay: '00:08:00'
- service: light.turn_off
entity_id:
- light.S1

View File

@ -106,3 +106,16 @@
entity_id: group.outdoor_lights
##############################################################################
- alias: "NOTIFY IF IP CHANGES"
trigger:
- platform: state
entity_id: sensor.ipchange
from: 'False'
to: 'True'
action:
- service: script.ifttt_notify
data_template:
value1: 'Changed IP address:'
value2: "New IP: {{ states('sensor.exteral_ip') }}"
value3: ' - Be sure to Cahnge DNS!'

View File

@ -6,7 +6,7 @@
resources:
# - type: last_boot
- type: since_last_boot
- platform: template
sensors:
since_last_boot_templated:
@ -50,3 +50,14 @@
{{ seconds }} seconds
{%- endif -%}
{%- endif -%}
- platform: rest
resource: http://ip.jsontest.com
name: External IP
value_template: '{{ value_json.ip }}'
- platform: template
sensors:
ipchange:
entity_id: sensor.external_ip
value_template: "{%- if is_state('sensor.external_ip', '67.8.31.24') -%} False {%- else -%} True {%- endif %}"