brianjking / homeassistant-config Goto Github PK
View Code? Open in Web Editor NEWConfiguration for @brianjking & @KinnaT's Home Assistant Installation
Home Page: https://home-assistant.io
Configuration for @brianjking & @KinnaT's Home Assistant Installation
Home Page: https://home-assistant.io
homeassistant.turn_on
and turn on group.livingroom
instead of light.couchbot
.- alias: Turn on office lights when there is movement
trigger:
platform: state
entity_id: binary_sensor.ecolink_pir_motion_sensor_sensor_2_0
to: 'on'
action:
service: homeassistant.turn_on
entity_id: light.officebot
- alias: Turn off lights when there is no motion
trigger:
platform: state
entity_id: sensor.motion_sensor
state: 'off'
for:
minutes: 10
action:
service: homeassistant.turn_off
entity_id: light.officebot
See [https://github.com/home-assistant/core/issues/6090#issuecomment-284622932](this post) for documentation.
Fixed in 62864f2
https://github.com/geekofweek/homeassistant/blob/master/tools/ha-mgmt.sh
#!/bin/bash
#################################################################
## Home Assistant Managment Tool
#################################################################
##########################################################
## Variables
##########################################################
hauser="USER_ACCOUNT"
habin="/usr/local/bin/hass"
haconfigdir="/home/USER/.homeassistant"
hahost="HOSTNAME/IP"
localuser="USER_ACCOUNT"
localhost="HOSTNAME/IP"
localpath="PATH_TO_LOCAL_HA_CONFIGS"
##########################################################
## Execute
##########################################################
answer=1
while [ "$answer" = 1 ]
do
clear
echo "This Script Will Modify Home Assistant"
echo "Proceed with Caution!"
echo ""
echo "What would you like to do?"
echo " "
echo "1) Deploy Home Assistant Configs"
echo "2) Restart Home Assistant - (sudo Required)"
echo "3) Stop Home Assistant - (sudo Required)"
echo "4) Start Home Assistant - (sudo Required)"
echo "5) Upgrade Home Assistant - (sudo Required)"
echo "6) Check Database Size - (sudo Required)"
echo "7) Validate Home Assistant Config"
echo "8) Backup Home Assistant"
echo "9) Exit"
echo " "
read action
if [ "$action" != "1" -a "$action" != "2" -a "$action" != "3" -a "$action" != "4" -a "$action" != "5" -a "$action" != "6" -a "$action" != "7" -a "$action" != "8" -a "$action" != "9" ];then
echo ":-("
echo "Error!"
echo "Invalid Option Stupid"
exit
fi
if [ "$action" == "1" ];then
clear
echo "Backing Up Home Assistant..."
echo "Creating Tar File..."
echo " "
ssh -t $hauser@$hahost "mkdir /home/$hauser/temp; cd $haconfigdir; tar -czf /home/$hauser/temp/ha-backup-`date +"%m-%d-%Y-%H-%M"`.tar.gz *"
echo " "
echo "Moving Backup to Local Host"
echo " "
ssh -t $hauser@$hahost "scp /home/$hauser/temp/*.tar.gz $localuser@$localhost:$localpath/Backups"
echo " "
echo "Deploying Home Assistant Configs..."
echo " "
rsync -au --exclude=".*" --exclude ".*/" $localpath/Config/ $hauser@$hahost:/$haconfigdir
echo " "
echo "Validating Home Assistant Configs..."
echo " "
ssh -t $hauser@$hahost "$habin --script check_config"
echo " "
echo "Home Assistant Config Validation Complete"
echo " "
echo "Cleaning Up..."
echo " "
ssh -t $hauser@$hahost "rm -rf /home/$hauser/temp;"
echo " "
echo "Home Assistant Config Deployment Complete"
fi
if [ "$action" == "2" ];then
clear
echo "Restarting Home Assistant..."
echo " "
ssh -t $hauser@$hahost "sudo systemctl restart home-assistant@ha"
echo " "
echo "Home Assistant Restart Complete"
echo " "
fi
if [ "$action" == "3" ];then
clear
echo "Stopping Home Assistant..."
echo " "
ssh -t $hauser@$hahost "sudo systemctl stop home-assistant@ha"
echo " "
echo "Home Assistant Stop Complete"
echo " "
fi
if [ "$action" == "4" ];then
clear
echo "Starting Home Assistant..."
echo " "
ssh -t $hauser@$hahost "sudo systemctl start home-assistant@ha"
echo " "
echo "Home Assistant Start Complete"
echo " "
fi
if [ "$action" == "5" ];then
clear
echo "Upgrading Home Assistant..."
echo " "
ssh -t $hauser@$hahost "sudo pip3 install --upgrade homeassistant"
echo " "
echo "Upgrade Complete"
echo " "
fi
if [ "$action" == "6" ];then
clear
echo "Checkign Size of Home Assistant Databae..."
echo " "
ssh -t $hauser@$hahost "sudo du -sh /var/lib/mysql | cut -c -5"
echo " "
echo "Home Assistant Size Check Complete"
echo " "
fi
if [ "$action" == "7" ];then
clear
echo "Validating Home Assistant Configs..."
echo " "
ssh -t $hauser@$hahost "$habin --script check_config"
echo " "
echo "Home Assistant Config Validation Complete"
echo " "
fi
if [ "$action" == "8" ];then
clear
echo "Backing Up Home Assistant..."
echo "Creating Tar File..."
echo " "
ssh -t $hauser@$hahost "mkdir /home/$hauser/temp; cd $haconfigdir; tar -czf /home/$hauser/temp/ha-backup-`date +"%m-%d-%Y-%H-%M"`.tar.gz *"
echo " "
echo "Moving Backup to Local Host"
echo " "
ssh -t $hauser@$hahost "scp /home/$hauser/temp/*.tar.gz $localuser@$localhost:$localpath/Backups"
echo " "
echo "Cleaning Up..."
echo " "
ssh -t $hauser@$hahost "rm -rf /home/$hauser/temp;"
echo " "
echo "Backup Complete"
echo " "
fi
if [ "$action" == "9" ];then
clear
echo " "
echo ":-("
echo "Exiting"
echo " "
exit
fi
echo " "
echo "Do You Want to Perform Another Task?"
echo " "
echo "1) Yes"
echo "2) No"
echo " "
read answer
if [ "$answer" = 1 ]
then "run script again"
fi
done
clear
echo " "
echo ":-("
echo "Exiting"
echo " "
https://home-assistant.io/components/sensor.uber/
sensor 5:
- platform: uber
server_token: !secret uber_token
start_latitude: !secret latitude
start_longitude: !secret longitude
light.tribot
and light.couchbot
when motion sensor triggeredlight.tribot
and light.couchbot
after X minutes if no one is home.light.tribot
and light.couchbot
on when Brian
and/or Kinna
is home.automation:
- alias: Turn on office lights when there is movement
trigger:
- platform: state
entity_id: sensor.motion_sensor
to: 'on'
action:
service: homeassistant.turn_on
entity_id: group.office_lights
- alias: Turn off lights when there is no motion
trigger:
- platform: state
entity_id: sensor.motion_sensor
state: 'off'
for:
minutes: 10
action:
service: homeassistant.turn_off
entity_id: group.office_lights
Add front door sensor
https://community.home-assistant.io/t/z-wave-door-sensor-suggestions/14963/10
Fixed in f43828a
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.