Home-AssistantConfig/config/packages/phynplus.yaml

55 lines
2.1 KiB
YAML
Raw Normal View History

2020-05-25 17:50:17 +00:00
#-------------------------------------------
# @CCOSTAN
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
# Phyn Smart Water ShutOff Support
# https://www.vcloudinfo.com/2020/05/phyn-plus-smart-water-shutoff-device.html
#-------------------------------------------
######################################################################
## Phyn Plus Water ShutOff - https://amzn.to/2Zy3sbJ
######################################################################
automation:
###################################
## From IFTTT - Notifications
###################################
- alias: 'Phyn ShutOff Notification'
trigger:
- platform: event
#Sent from IFTTT Webhooks : {"action":"IFTTT_Phyn", "alert_type":" {{AlertType}}", "where":"{{SuggestedFixtures}}"}
event_type: ifttt_webhook_received
event_data:
action: IFTTT_Phyn
action:
- service: script.notify_engine
data_template:
title: 'Phyn Leak Detection'
value1: 'Phyn is sensing {{ trigger.event.data.alert_type }}. Please verify {{ trigger.event.data.where }}.'
who: 'family'
url: 'https://github.com/CCOSTAN/Home-AssistantConfig/raw/master/config/www/custom_ui/floorplan/images/branding/pipeleak.png'
apns_id: 'IFTTT_Phyn'
2020-05-25 17:50:17 +00:00
- service: script.speech_engine
data_template:
value1: >
{{ [
"Attention please. The Phyn unit has detected a possible leak. Please verify there are no leaks in the house. "
] | random }}
call_no_announcement: 1
2020-05-25 17:50:17 +00:00
- service: script.tweet_engine_image
data_template:
tweet: >
{{ [
".@Phyn has detected a leak and notified us using Home Assistant. ",
"I am shutting down the water since @Phyn detected a leak.",
2020-05-25 17:50:17 +00:00
"Time to let @ccostan know that @Phyn has detected a leak."
] | random + " #SavingWater (https://www.vcloudinfo.com/2020/05/phyn-plus-smart-water-shutoff-device.html)" }}
image: >-
{{ [
2020-05-25 20:57:05 +00:00
"/config/www/custom_ui/floorplan/images/branding/pipeleak.png"
2020-05-25 17:50:17 +00:00
] | random }}