git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
| blueprint: | |
| name: Light/switch auto-off after time | |
| description: Turn off a light/switch after time has passed. On HA restart timer is restarted (for simplicity) | |
| source_url: https://gist.github.com/gwww/79a2e97594b6d43c1cb3acc6f6cf43e7 | |
| domain: automation | |
| author: Glenn Waters | |
| input: | |
| light_target: | |
| name: Light/switch | |
| selector: |
| #!python3 | |
| # Based on: https://community.home-assistant.io/t/api-for-changing-entities/282114/3 | |
| import asyncio | |
| import json | |
| import os | |
| import re | |
| import sys | |
| import yaml # type: ignore | |
| import websockets |
| #!/bin/sh | |
| lastlog_file="/home/admin/link-down/lastlog.txt" | |
| history_file="/home/admin/link-down/history.txt" | |
| down_logs="clog /var/log/system.log | grep 'link state changed to DOWN$'" | |
| last_log=`eval $down_logs | tail -1` | |
| if [ ! -e $lastlog_file ]; then | |
| echo "$last_log" >$lastlog_file | |
| touch -A -235959 $lastlog_file |
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
| # Optional stylus section | |
| # 'command' defaults to 'stylus' if not present | |
| # 'options' default to blank if not present | |
| # 'options' are a YAML String | |
| stylus: | |
| command: ./node_modules/stylus/bin/stylus | |
| options: | |
| --include ./css | |
| --include ./node_modules/nib/lib |