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'
|
2020-05-25 21:22:38 +00:00
|
|
|
url: 'https://github.com/CCOSTAN/Home-AssistantConfig/raw/master/config/www/custom_ui/floorplan/images/branding/pipeleak.png'
|
2020-05-29 21:50:36 +00:00
|
|
|
apns_id: 'IFTTT_Phyn'
|
2020-05-25 17:50:17 +00:00
|
|
|
|
2020-05-25 21:44:25 +00:00
|
|
|
- service: script.speech_engine
|
|
|
|
data_template:
|
|
|
|
value1: >
|
|
|
|
{{ [
|
2020-05-25 21:50:22 +00:00
|
|
|
"Attention please. The Phyn unit has detected a possible leak. Please verify there are no leaks in the house. "
|
2020-05-25 21:44:25 +00:00
|
|
|
] | random }}
|
|
|
|
call_no_announcement: 1
|
|
|
|
|
2020-05-25 17:50:17 +00:00
|
|
|
- service: script.tweet_engine_image
|
|
|
|
data_template:
|
|
|
|
tweet: >
|
|
|
|
{{ [
|
2020-05-25 21:22:38 +00:00
|
|
|
".@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 }}
|