#288 Updated some of the static Holidays using Command Line

This commit is contained in:
ccostan 2019-10-21 17:42:01 -04:00
parent d71547b1b0
commit 6987313cbc
2 changed files with 6 additions and 10 deletions

View File

@ -63,18 +63,16 @@ sensor:
# Countdown Sesor using WolfRam Alpha Natural language queries # Countdown Sesor using WolfRam Alpha Natural language queries
################################################################################ ################################################################################
- platform: rest - platform: command_line
name: Halloween Countdown name: Halloween Countdown
resource: !secret wolframalpha_halloween_api command: "HALLOWEEN=`date -d 'Oct 31' +%j | awk '{print $1 + 0}'`; TODAY=`date +%j | awk '{print $1 + 0}'`; DAYS=$(($HALLOWEEN - $TODAY)); echo $DAYS"
value_template: "{{ (value|replace(' days', '')) | int }}"
unit_of_measurement: Days unit_of_measurement: Days
scan_interval: 43200 scan_interval: 43200
- platform: rest - platform: command_line
name: Christams Countdown command: "XMAS=`date -d 'Dec 25' +%j | awk '{print $1 + 0}'`; TODAY=`date +%j | awk '{print $1 + 0}'`; DAYS=$(($XMAS - $TODAY)); echo $DAYS"
resource: !secret wolframalpha_xmas_api name: Christmas Countdown
value_template: "{{ (value|replace(' days', '')) | int }}" unit_of_measurement: days
unit_of_measurement: Days
scan_interval: 43200 scan_interval: 43200
- platform: rest - platform: rest

View File

@ -73,8 +73,6 @@ cloud_user_pool: 'SuperSecretPlace'
cloud_relayer: 'SuperSecretWebThingy' cloud_relayer: 'SuperSecretWebThingy'
vantage_api: LONGAPIKEYFORFREE vantage_api: LONGAPIKEYFORFREE
minecraft: private_server.com minecraft: private_server.com
wolframalpha_halloween_api: https://api.wolframalpha.com/v2/result?appid=JIUY8U-4V8KY45VT1&i=How%20many%20days%20until%20halloween
wolframalpha_xmas_api: https://api.wolframalpha.com/v2/result?appid=JIUY8U-4V8KY45VT1&i=How%20many%20days%20until%20christmas
wolframalpha_easter_api: https://api.wolframalpha.com/v2/result?appid=JIUY8U-4V8KY45VT1&i=How%20many%20days%20until%20easter wolframalpha_easter_api: https://api.wolframalpha.com/v2/result?appid=JIUY8U-4V8KY45VT1&i=How%20many%20days%20until%20easter
wolframalpha_mothersday_api: https://api.wolframalpha.com/v2/result?appid=JIUY8U-4V8KY45VT1&i=How%20many%20days%20until%20mothers%20day wolframalpha_mothersday_api: https://api.wolframalpha.com/v2/result?appid=JIUY8U-4V8KY45VT1&i=How%20many%20days%20until%20mothers%20day
wolframalpha_fathersday_api: https://api.wolframalpha.com/v2/result?appid=JIUY8U-4V8KY45VT1&i=How%20many%20days%20until%20fathers%20day wolframalpha_fathersday_api: https://api.wolframalpha.com/v2/result?appid=JIUY8U-4V8KY45VT1&i=How%20many%20days%20until%20fathers%20day