Fixing the IP Change sensor to be hidden due to secrets bug in templating.

This commit is contained in:
CCOSTAN 2017-02-14 16:05:44 +00:00
parent 45538b5243
commit 4d519db682
2 changed files with 9 additions and 5 deletions

1
.gitignore vendored
View File

@ -18,4 +18,5 @@ phue.conf
pyozw.sqlite
nest.conf
.uuid
ipchange.yaml

View File

@ -54,8 +54,11 @@
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', '!secret external_ip') -%} False {%- else -%} True {%- endif %}"
#############################################################################################################
### 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 %}"
#############################################################################################################