From 086738911d2e434a3bd9d1b440a1b5c39783c02b Mon Sep 17 00:00:00 2001 From: CCOSTAN Date: Tue, 28 Feb 2017 04:46:32 +0000 Subject: [PATCH] Fixed the IP Sensor Change to account for quota limit errors. --- sensor/systemmonitor.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sensor/systemmonitor.yaml b/sensor/systemmonitor.yaml index 96284937..67f03705 100755 --- a/sensor/systemmonitor.yaml +++ b/sensor/systemmonitor.yaml @@ -4,7 +4,7 @@ - type: since_last_boot - type: disk_use_percent arg: / - + - platform: template sensors: since_last_boot_templated: @@ -52,13 +52,13 @@ - platform: rest resource: http://ip.jsontest.com name: External IP - value_template: '{{ value_json.ip }}' - + value_template: '{{ value_json.ip }}' + ############################################################################################################# ### This part of the automation is hidden due to the IP address exposed ## # - platform: template # sensors: # ipchange: # entity_id: sensor.external_ip - # value_template: "{%- if is_state('sensor.external_ip', 'xxx.xxx.xxx.xxx') -%} False {%- else -%} True {%- endif %}" -############################################################################################################# \ No newline at end of file + # value_template: "{%- if is_state('sensor.external_ip', 'xxx.xxx.xxx.xxx') -%} False {%- elif is_state('sensor.external_ip', 'unknown' ) -%} False {%- else -%} True {%- endif %}" +#############################################################################################################