Home-AssistantConfig/config/packages/fitness_steps.yaml

36 lines
1.5 KiB
YAML
Executable File

#-------------------------------------------
# @CCOSTAN
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
# Try to leverage iPhone Mobile App Data for Activity Tweets!
# You can read more about this on https://www.vCloudInfo.com
#-------------------------------------------
##############################################################################
### Automations
##############################################################################
automation:
- alias: 'Step Tracker' # https://github.com/CCOSTAN/Home-AssistantConfig/issues/786
trigger:
- platform: numeric_state
entity_id:
- sensor.carlo_xsmax_steps
- sensor.paige_6s_steps
- sensor.steps_3
above: 5000
action:
- service: script.tweet_engine_image
data_template:
tweet: >
{{ [
"Somebody just hit {{ states('trigger.entity_id') }} steps on the #Fitbit!",
"Keep on moving. Somebody just hit {{ states('strigger.entity_id') }} #Fitbit steps.",
"#Fitness Tracking at home BY the home. Somebody just hit {{ states('trigger.entity_id') }} #Fitbit steps"
] | random + " #Self #Data"}}
image: >-
{{ [
"/config/www/custom_ui/floorplan/images/branding/fitness.png",
"/config/www/custom_ui/floorplan/images/branding/fitness2.png",
"/config/www/custom_ui/floorplan/images/branding/fitness3.png"
] | random }}