From 7b125f035731bdabff89bbea4b103cb9d4a474ab Mon Sep 17 00:00:00 2001 From: Florian Brinker Date: Sun, 12 Apr 2020 22:56:20 +0200 Subject: [PATCH] Fix Alexa, change hum alert settings, add tiktok tracking --- alexa_wrapper.sh | 2 +- config/alerts/humidity.yaml | 16 ++++++++-------- config/alerts/windows.yaml | 4 ++-- config/influxdb.yaml | 6 +++++- config/sensors/social.yaml | 22 ++++++++++++++++++++++ 5 files changed, 38 insertions(+), 12 deletions(-) diff --git a/alexa_wrapper.sh b/alexa_wrapper.sh index d463366..17f8eeb 100755 --- a/alexa_wrapper.sh +++ b/alexa_wrapper.sh @@ -64,7 +64,7 @@ shift read message -formatted=${message// /_} +formatted=${message// /-} $ALEXA_REMOTE -d "$DEVICE" -e speak:$formatted >> /dev/null exit 0 \ No newline at end of file diff --git a/config/alerts/humidity.yaml b/config/alerts/humidity.yaml index f4fca39..aeac401 100644 --- a/config/alerts/humidity.yaml +++ b/config/alerts/humidity.yaml @@ -7,7 +7,7 @@ humidity_too_high_bathroom: state: "on" repeat: - 30 - - 360 + - 480 can_acknowledge: true skip_first: true notifiers: @@ -22,7 +22,7 @@ humidity_too_high_bathroom_kids: state: "on" repeat: - 30 - - 360 + - 480 can_acknowledge: true skip_first: true notifiers: @@ -37,7 +37,7 @@ humidity_too_high_bedroom: state: "on" repeat: - 30 - - 360 + - 480 can_acknowledge: true skip_first: true notifiers: @@ -52,7 +52,7 @@ humidity_too_high_livingroom: state: "on" repeat: - 30 - - 360 + - 480 can_acknowledge: true skip_first: true notifiers: @@ -67,7 +67,7 @@ humidity_too_high_guestroom: state: "on" repeat: - 30 - - 360 + - 480 can_acknowledge: true skip_first: true notifiers: @@ -82,7 +82,7 @@ humidity_too_high_office: state: "on" repeat: - 30 - - 360 + - 480 can_acknowledge: true skip_first: true notifiers: @@ -97,7 +97,7 @@ humidity_too_high_attic: state: "on" repeat: - 30 - - 360 + - 480 can_acknowledge: true skip_first: true notifiers: @@ -112,7 +112,7 @@ humidity_too_high_hwr: state: "on" repeat: - 30 - - 360 + - 480 can_acknowledge: true skip_first: true notifiers: diff --git a/config/alerts/windows.yaml b/config/alerts/windows.yaml index 387043b..79d32ba 100644 --- a/config/alerts/windows.yaml +++ b/config/alerts/windows.yaml @@ -11,7 +11,7 @@ bathroom_window_open: skip_first: true notifiers: - telegram_group - - alexa_kitchen + - alexa_all attic_window_open: name: Dachboden-Fenster geƶffnet @@ -24,4 +24,4 @@ attic_window_open: skip_first: true notifiers: - telegram_group - - alexa_kitchen \ No newline at end of file + - alexa_all \ No newline at end of file diff --git a/config/influxdb.yaml b/config/influxdb.yaml index 9cf8b79..227b698 100644 --- a/config/influxdb.yaml +++ b/config/influxdb.yaml @@ -52,4 +52,8 @@ - sensor.instagram_lotte_media - sensor.instagram_codedwithlove - sensor.instagram_codedwithlove_follows - - sensor.instagram_codedwithlove_media \ No newline at end of file + - sensor.instagram_codedwithlove_media + # TikTok + - sensor.tiktok_beauty + - sensor.tiktok_beauty_hearts + - sensor.tiktok_beauty_videos \ No newline at end of file diff --git a/config/sensors/social.yaml b/config/sensors/social.yaml index 23668dd..28ba954 100644 --- a/config/sensors/social.yaml +++ b/config/sensors/social.yaml @@ -218,3 +218,25 @@ resource: !secret instagram_codedwithlove value_template: '{{ value_json.data.counts.media }}' force_update: true + +# TikTok + # beauty + - platform: rest + scan_interval: 300 + name: tiktok_beauty + resource: !secret tiktok_beauty + value_template: '{{ value_json.data.userInfo.stats.followerCount }}' + unit_of_measurement: Followers + force_update: true + - platform: rest + scan_interval: 300 + name: tiktok_beauty_hearts + resource: !secret tiktok_beauty + value_template: '{{ value_json.data.userInfo.stats.heartCount }}' + force_update: true + - platform: rest + scan_interval: 300 + name: tiktok_beauty_videos + resource: !secret tiktok_beauty + value_template: '{{ value_json.data.userInfo.stats.videoCount }}' + force_update: true \ No newline at end of file