The step data is not perfect but let's give this a shot. #786
This commit is contained in:
parent
5f9edafc93
commit
b161dd45b1
|
@ -4,15 +4,15 @@
|
||||||
|
|
||||||
- alias: 'Dark House Little extra light'
|
- alias: 'Dark House Little extra light'
|
||||||
trigger:
|
trigger:
|
||||||
- platform: state
|
|
||||||
entity_id: sun.sun
|
|
||||||
to: below_horizon
|
|
||||||
- platform: numeric_state
|
- platform: numeric_state
|
||||||
entity_id: sensor.dark_sky_cloud_coverage
|
entity_id: sensor.dark_sky_cloud_coverage
|
||||||
above: 90
|
above: 90
|
||||||
- platform: state
|
- platform: state
|
||||||
entity_id: sensor.dark_sky_precip
|
entity_id: sensor.dark_sky_precip
|
||||||
to: 'rain'
|
to: 'rain'
|
||||||
|
- platform: numeric_state
|
||||||
|
entity_id: sensor.dark_sky_precip_intensity
|
||||||
|
above: 0.2
|
||||||
- platform: state
|
- platform: state
|
||||||
entity_id: group.family
|
entity_id: group.family
|
||||||
to: 'home'
|
to: 'home'
|
||||||
|
@ -30,9 +30,9 @@
|
||||||
- condition: numeric_state
|
- condition: numeric_state
|
||||||
entity_id: sensor.dark_sky_cloud_coverage
|
entity_id: sensor.dark_sky_cloud_coverage
|
||||||
above: 90
|
above: 90
|
||||||
- condition: state
|
- condition: numeric_state
|
||||||
entity_id: sensor.dark_sky_precip
|
entity_id: sensor.dark_sky_precip_intensity
|
||||||
state: 'rain'
|
above: 0.2
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: binary_sensor.sleepnumber_carlo_carlo_is_in_bed
|
entity_id: binary_sensor.sleepnumber_carlo_carlo_is_in_bed
|
||||||
state: 'off'
|
state: 'off'
|
||||||
|
@ -45,7 +45,7 @@
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: group.family
|
entity_id: group.family
|
||||||
state: 'home'
|
state: 'home'
|
||||||
- condition: template # Only run once every ~3 hours tops.
|
- condition: template # Only run once every ~3 hours tops.
|
||||||
value_template: >
|
value_template: >
|
||||||
{%- if states.automation.dark_house_little_extra_light.attributes.last_triggered -%}
|
{%- if states.automation.dark_house_little_extra_light.attributes.last_triggered -%}
|
||||||
{{ (as_timestamp(now()) - as_timestamp(states.automation.dark_house_little_extra_light.attributes.last_triggered)) > 10000 }}
|
{{ (as_timestamp(now()) - as_timestamp(states.automation.dark_house_little_extra_light.attributes.last_triggered)) > 10000 }}
|
||||||
|
|
|
@ -1,83 +1,32 @@
|
||||||
#-------------------------------------------
|
#-------------------------------------------
|
||||||
# @CCOSTAN
|
# @CCOSTAN
|
||||||
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
|
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
|
||||||
# Neato Support for D7 Connected Botvac - control my [Neato Vacuum](https://amzn.to/2kqnnqu) with Home Assistant.
|
# Try to leverage iPhone Mobile App Data for Activity Tweets!
|
||||||
|
# You can read more about this on https://www.vCloudInfo.com
|
||||||
#-------------------------------------------
|
#-------------------------------------------
|
||||||
# homeassistant:
|
|
||||||
# customize_glob:
|
|
||||||
# "*.*_sleep_hours":
|
|
||||||
# unit_of_measurement: hours
|
|
||||||
# icon: mdi:sleep
|
|
||||||
#
|
|
||||||
#
|
|
||||||
#-------------------------------------------
|
|
||||||
sensor:
|
|
||||||
- platform: fitbit
|
|
||||||
# filename: fitbit-carlo.conf
|
|
||||||
clock_format: 12H
|
|
||||||
monitored_resources:
|
|
||||||
- "body/weight"
|
|
||||||
- "activities/steps"
|
|
||||||
- "devices/battery"
|
|
||||||
|
|
||||||
# - platform: fitbit
|
|
||||||
# filename: fitbit-stacey.conf
|
|
||||||
# clock_format: 12H
|
|
||||||
# monitored_resources:
|
|
||||||
# - "body/weight"
|
|
||||||
# - "activities/steps"
|
|
||||||
# - "devices/battery"
|
|
||||||
#-------------------------------------------
|
|
||||||
group:
|
|
||||||
fitbit:
|
|
||||||
entities:
|
|
||||||
- sensor.steps
|
|
||||||
- sensor.weight
|
|
||||||
- sensor.one_battery
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
### Automations - Detect when things are not right. Like any Good Watchdog.
|
### Automations
|
||||||
##############################################################################
|
##############################################################################
|
||||||
automation:
|
automation:
|
||||||
- alias: 'Missing Fitbit Alert'
|
- alias: 'Step Tracker' # https://github.com/CCOSTAN/Home-AssistantConfig/issues/786
|
||||||
initial_state: 'on'
|
|
||||||
trigger:
|
trigger:
|
||||||
- platform: time
|
- platform: numeric_state
|
||||||
at: '11:00:00'
|
|
||||||
condition:
|
|
||||||
condition: template
|
|
||||||
value_template: >
|
|
||||||
{%- if states.sensor.steps.state.replace(",", "")|int < 1000 -%}
|
|
||||||
true
|
|
||||||
{%- endif -%}
|
|
||||||
action:
|
|
||||||
- service: script.notify_engine
|
|
||||||
data_template:
|
|
||||||
value1: "Your current fitbit steps are {{ states('sensor.steps') }} - You probably do not have it."
|
|
||||||
who: 'carlo'
|
|
||||||
apns_id: 'information'
|
|
||||||
|
|
||||||
- alias: 'Fitbit 10k'
|
|
||||||
initial_state: 'on'
|
|
||||||
trigger:
|
|
||||||
- platform: state
|
|
||||||
entity_id:
|
entity_id:
|
||||||
- binary_sensor.sleepnumber_carlo_carlo_is_in_bed
|
- sensor.carlo_xsmax_steps
|
||||||
to: 'on'
|
- sensor.paige_6s_steps
|
||||||
condition:
|
- sensor.steps_3
|
||||||
- condition: template
|
above: 5000
|
||||||
value_template: >
|
|
||||||
{%- if states.sensor.steps.state.replace(",", "")|int > 10000 -%}
|
|
||||||
true
|
|
||||||
{%- endif -%}
|
|
||||||
action:
|
action:
|
||||||
- service: script.tweet_engine_image
|
- service: script.tweet_engine_image
|
||||||
data_template:
|
data_template:
|
||||||
tweet: >
|
tweet: >
|
||||||
{{ [
|
{{ [
|
||||||
"Somebody just hit {{ states('sensor.steps') }} steps on the #Fitbit!",
|
"Somebody just hit {{ states('trigger.entity_id') }} steps on the #Fitbit!",
|
||||||
"Keep on moving. Somebody just hit {{ states('sensor.steps') }} #Fitbit steps.",
|
"Keep on moving. Somebody just hit {{ states('strigger.entity_id') }} #Fitbit steps.",
|
||||||
"#Fitness Tracking at home BY the home. Somebody just hit {{ states('sensor.steps') }} #Fitbit steps"
|
"#Fitness Tracking at home BY the home. Somebody just hit {{ states('trigger.entity_id') }} #Fitbit steps"
|
||||||
] | random + " Battery Level:{{ states('sensor.one_battery') }} #Self #Data"}}
|
] | random + " #Self #Data"}}
|
||||||
image: >-
|
image: >-
|
||||||
{{ [
|
{{ [
|
||||||
"/config/www/custom_ui/floorplan/images/branding/fitness.png",
|
"/config/www/custom_ui/floorplan/images/branding/fitness.png",
|
||||||
|
|
Loading…
Reference in New Issue