Updated with Episode 39. (https://www.vcloudinfo.com/2019/11/adding-days-until-sensor-to-my-home-assistant-speech-routines.html)
This commit is contained in:
parent
0f7de56245
commit
286f997b2c
|
@ -88,7 +88,7 @@ http:
|
||||||
ssl_certificate: !secret ssl_certificate
|
ssl_certificate: !secret ssl_certificate
|
||||||
ssl_key: !secret ssl_key
|
ssl_key: !secret ssl_key
|
||||||
ip_ban_enabled: True
|
ip_ban_enabled: True
|
||||||
login_attempts_threshold: 3
|
login_attempts_threshold: 2
|
||||||
|
|
||||||
frontend:
|
frontend:
|
||||||
javascript_version: latest
|
javascript_version: latest
|
||||||
|
|
|
@ -81,7 +81,7 @@ sensor:
|
||||||
scan_interval: 43200
|
scan_interval: 43200
|
||||||
|
|
||||||
- platform: rest
|
- platform: rest
|
||||||
name: Christams Countdown
|
name: Christmas Countdown
|
||||||
resource: !secret wolframalpha_xmas_api
|
resource: !secret wolframalpha_xmas_api
|
||||||
value_template: "{{ (value|replace(' days', '')) | int }}"
|
value_template: "{{ (value|replace(' days', '')) | int }}"
|
||||||
unit_of_measurement: Days
|
unit_of_measurement: Days
|
||||||
|
|
|
@ -198,6 +198,9 @@ tweet_youtube_engine_setup:
|
||||||
],
|
],
|
||||||
"S02E38": [
|
"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)"
|
"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)"
|
||||||
]
|
]
|
||||||
|
|
||||||
} %}
|
} %}
|
||||||
|
|
|
@ -123,6 +123,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{%- endmacro -%}
|
{%- endmacro -%}
|
||||||
|
|
||||||
|
{# YOUTUBE VIDEO ********* https://www.vcloudinfo.com/2019/11/adding-days-until-sensor-to-my-home-assistant-speech-routines.html #}
|
||||||
{%- macro days_until() -%}
|
{%- macro days_until() -%}
|
||||||
{% set month=states("sensor.date").split('-')[1] | int %}
|
{% set month=states("sensor.date").split('-')[1] | int %}
|
||||||
{%- if month == 4 or month == 5 -%}
|
{%- if month == 4 or month == 5 -%}
|
||||||
|
@ -132,7 +133,7 @@
|
||||||
{%- elif month == 9 or month == 10 -%}
|
{%- elif month == 9 or month == 10 -%}
|
||||||
and don't forget, there are {{ states.sensor.halloween_countdown.state }} days until Halloween!
|
and don't forget, there are {{ states.sensor.halloween_countdown.state }} days until Halloween!
|
||||||
{%- elif month == 11 or month == 12 -%}
|
{%- 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 %}
|
{% endif %}
|
||||||
{%- endmacro -%}
|
{%- endmacro -%}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue