ccostan 2019-11-15 19:16:23 -05:00
parent 0f7de56245
commit 286f997b2c
4 changed files with 7 additions and 3 deletions

View File

@ -88,7 +88,7 @@ http:
ssl_certificate: !secret ssl_certificate
ssl_key: !secret ssl_key
ip_ban_enabled: True
login_attempts_threshold: 3
login_attempts_threshold: 2
frontend:
javascript_version: latest

View File

@ -81,7 +81,7 @@ sensor:
scan_interval: 43200
- platform: rest
name: Christams Countdown
name: Christmas Countdown
resource: !secret wolframalpha_xmas_api
value_template: "{{ (value|replace(' days', '')) | int }}"
unit_of_measurement: Days

View File

@ -198,6 +198,9 @@ tweet_youtube_engine_setup:
],
"S02E38": [
"How to Build Home Assistant Sensors using Wolfram Alpha (https://www.vcloudinfo.com/2019/10/how-to-build-home-assistant-sensors-using-wolfram-alpha.html)"
],
"S02E39": [
"Adding Days Until Sensor to my Home Assistant Speech routines (https://www.vcloudinfo.com/2019/11/adding-days-until-sensor-to-my-home-assistant-speech-routines.html)"
]
} %}

View File

@ -123,6 +123,7 @@
{% endif %}
{%- endmacro -%}
{# YOUTUBE VIDEO ********* https://www.vcloudinfo.com/2019/11/adding-days-until-sensor-to-my-home-assistant-speech-routines.html #}
{%- macro days_until() -%}
{% set month=states("sensor.date").split('-')[1] | int %}
{%- if month == 4 or month == 5 -%}
@ -132,7 +133,7 @@
{%- elif month == 9 or month == 10 -%}
and don't forget, there are {{ states.sensor.halloween_countdown.state }} days until Halloween!
{%- elif month == 11 or month == 12 -%}
and don't forget, there are {{ states.sensor.xmas_countdown.state }} days until Christmas!
and don't forget, there are {{ states.sensor.christmas_countdown.state }} days until Christmas!
{% endif %}
{%- endmacro -%}