mysmarthome/packages/lights.yaml

349 lines
10 KiB
YAML
Raw Normal View History

2019-04-17 22:46:06 +00:00
###############################################################################
# @author : Mahasri Kalavala
# @date : 04/15/2017
# @package : Lights
# @description : Lights, Lights, Lights! All the Lights are here!
###############################################################################
homeassistant:
customize:
switch.frontyard_light:
icon: mdi:lightbulb
friendly_name: Front Porch Lights
emulated_hue_name: Front Yard Lights
homebridge_name: Front Yard Lights
switch.wemoswitch1:
icon: mdi:lamp
friendly_name: TV Switch
emulated_hue_name: TV Switch
homebridge_name: TV Switch
switch.wemobackyardlightswitch:
icon: mdi:lightbulb
friendly_name: Backyard Lights
emulated_hue_name: Backyard Lights
homebridge_name: Backyard Lights
light.family_room:
friendly_name: Family Room Lights
emulated_hue_name: Family Room Lights
homebridge_name: Front Room Lights
light.master_bedroom:
friendly_name: Master Bedroom Lights
emulated_hue_name: Master Bedroom Lights
homebridge_name: Master Bedroom Lights
switch.guest_bedroom:
icon: mdi:lightbulb
friendly_name: Guest Bedroom 1
emulated_hue_name: Guest Bedroom 1
homebridge_name: Guest Bedroom 1
switch.prayer_room:
icon: mdi:lightbulb
friendly_name: Guest Bedroom 2
emulated_hue_name: Guest Bedroom 2
homebridge_name: Guest Bedroom 2
2019-12-20 15:32:28 +00:00
2019-04-17 22:46:06 +00:00
switch.zwave_smart_switch_switch:
friendly_name: Office Room Accent Lights
emulated_hue_name: Office Room Accent Lights
homebridge_name: Office Room Accent Lights
assumed_state: false
icon: mdi:lightbulb
2020-02-05 23:28:38 +00:00
switch.kids_bed_accent:
friendly_name: Hasika's Bed Accent Lights
assumed_state: false
icon: mdi:lightbulb
switch.front_room:
friendly_name: Front Room Light
assumed_state: false
icon: mdi:lightbulb
2019-04-17 22:46:06 +00:00
switch.basement_left:
friendly_name: Basement Theater Lights
assumed_state: false
icon: mdi:lightbulb
switch.basement_right:
friendly_name: Basement Right Side Lights
assumed_state: false
icon: mdi:lightbulb
switch.kitchen:
friendly_name: Kitchen Light
assumed_state: false
icon: mdi:lightbulb
switch.office_room:
friendly_name: Office Room Lights
assumed_state: false
icon: mdi:lightbulb
switch.kids_bedroom:
friendly_name: Kids Bedroom
icon: mdi:lightbulb
switch.garage:
friendly_name: Garage Lights
icon: mdi:lightbulb
light.hue_color_lamp_1:
friendly_name: Family Room Light 1
color_set: false
light.hue_color_lamp_2:
friendly_name: Family Room Light 2
color_set: false
light.hue_color_lamp_3:
friendly_name: Family Room Light 3
color_set: false
input_boolean.short_flash:
icon: mdi:flash
friendly_name: Short Flash
input_boolean.long_flash:
2019-12-20 15:32:28 +00:00
icon: mdi:flash
2019-04-17 22:46:06 +00:00
friendly_name: Long Flash
input_boolean.animate_downstairs_lights:
icon: mdi:flash-outline
2019-12-20 15:32:28 +00:00
friendly_name: Animate Family Room Lights
2019-04-17 22:46:06 +00:00
input_boolean.animate_upstairs_lights:
icon: mdi:flash-outline
friendly_name: Animate Master Bedroom Lights
hue:
bridges:
- host: !secret philips_hue_ipaddress
tplink:
discovery: false
switch:
2019-12-20 15:32:28 +00:00
# In-wall switches
- host: !secret tplink_kids_bedroom
- host: !secret tplink_guest_bedroom_1
- host: !secret tplink_guest_bedroom_2
- host: !secret tplink_garage
- host: !secret tplink_basement_left
- host: !secret tplink_basement_right
- host: !secret tplink_kitchen
- host: !secret tplink_office_room
2020-02-05 23:28:38 +00:00
- host: !secret tplink_front_room
2019-12-20 15:32:28 +00:00
# Smart Outlets
- host: !secret tplink_smart_outlet1
#name: Downstairs Fragrance Outlet
- host: !secret tplink_smart_outlet2
#name: Downstairs Bathroom Fragrance Outlet
- host: !secret tplink_smart_outlet3
#name: Upstairs Fragrance Outlet
- host: !secret tplink_kids_bed_accent_light
#name: Kids Bed Accent Light
2019-04-17 22:46:06 +00:00
wemo:
2019-07-07 20:47:16 +00:00
discovery: false
2019-04-17 22:46:06 +00:00
static:
- !secret wemo_switch_1
- !secret wemo_switch_2
- !secret wemo_switch_3
- !secret wemo_sharp_tv
input_boolean:
animate_upstairs_lights:
name: Animate Master Bedroom Lights
initial: off
animate_downstairs_lights:
name: Animate Family Room Lights
initial: off
long_flash:
name: Long Flash Lights
initial: off
short_flash:
name: Long Flash Lights
initial: off
###############################################################################
2019-12-20 15:32:28 +00:00
# _ _ _
# /\ | | | | (_)
# / \ _ _| |_ ___ _ __ ___ __ _| |_ _ ___ _ __ ___
2019-04-17 22:46:06 +00:00
# / /\ \| | | | __/ _ \| '_ ` _ \ / _` | __| |/ _ \| '_ \/ __|
# / ____ \ |_| | || (_) | | | | | | (_| | |_| | (_) | | | \__ \
# /_/ \_\__,_|\__\___/|_| |_| |_|\__,_|\__|_|\___/|_| |_|___/
2019-12-20 15:32:28 +00:00
#
2019-04-17 22:46:06 +00:00
###############################################################################
automation:
2019-12-20 15:32:28 +00:00
# Animate Master Bedroom Lights
###############################################################################
2019-04-17 22:46:06 +00:00
- alias: Animate Master Bedroom Lights
initial_state: true
trigger:
platform: time_pattern
2019-12-20 15:32:28 +00:00
seconds: "/5"
2019-04-17 22:46:06 +00:00
condition:
- condition: state
entity_id: input_boolean.animate_upstairs_lights
2019-12-20 15:32:28 +00:00
state: "on"
2019-04-17 22:46:06 +00:00
- condition: state
entity_id: input_boolean.light_automations
2019-12-20 15:32:28 +00:00
state: "on"
2019-04-17 22:46:06 +00:00
action:
- service: light.turn_on
data:
entity_id: group.master_bedroom_lights
transition: 5
brightness: 255
color_temp: 366
data_template:
2019-12-20 15:32:28 +00:00
rgb_color:
[
'{{ "{0:d}".format(range(0, 255)|random) }}',
'{{ "{0:d}".format(range(0, 255)|random) }}',
'{{ "{0:d}".format(range(0, 255)|random) }}',
]
# Restore Master Bedroom Lights
###############################################################################
2019-04-17 22:46:06 +00:00
- alias: Restore Masterbedroom Lights
initial_state: true
trigger:
platform: state
entity_id: input_boolean.animate_upstairs_lights
2019-12-20 15:32:28 +00:00
to: "off"
2019-04-17 22:46:06 +00:00
condition:
- condition: state
entity_id: input_boolean.light_automations
2019-12-20 15:32:28 +00:00
state: "on"
2019-04-17 22:46:06 +00:00
action:
- service: light.turn_on
data:
entity_id: group.master_bedroom_lights
transition: 5
2019-12-20 15:32:28 +00:00
rgb_color: [224, 175, 102]
2019-04-17 22:46:06 +00:00
brightness: 10
color_temp: 366
2019-12-20 15:32:28 +00:00
# Animate Familyroom Lights
###############################################################################
2019-04-17 22:46:06 +00:00
- alias: Animate Familyroom Lights
initial_state: true
trigger:
platform: time_pattern
2019-12-20 15:32:28 +00:00
seconds: "/5"
2019-04-17 22:46:06 +00:00
condition:
- condition: state
entity_id: input_boolean.animate_downstairs_lights
2019-12-20 15:32:28 +00:00
state: "on"
2019-04-17 22:46:06 +00:00
- condition: state
entity_id: input_boolean.light_automations
2019-12-20 15:32:28 +00:00
state: "on"
2019-04-17 22:46:06 +00:00
action:
- service: light.turn_on
data:
entity_id: group.family_room_lights
transition: 5
brightness: 255
color_temp: 366
data_template:
2019-12-20 15:32:28 +00:00
rgb_color:
[
'{{ "{0:d}".format(range(0, 255)|random) }}',
'{{ "{0:d}".format(range(0, 255)|random) }}',
'{{ "{0:d}".format(range(0, 255)|random) }}',
]
# Restore Familyroom Lights
###############################################################################
2019-04-17 22:46:06 +00:00
- alias: Restore Familyroom Lights
initial_state: true
trigger:
platform: state
entity_id: input_boolean.animate_downstairs_lights
2019-12-20 15:32:28 +00:00
to: "off"
2019-04-17 22:46:06 +00:00
condition:
- condition: state
entity_id: input_boolean.light_automations
2019-12-20 15:32:28 +00:00
state: "on"
2019-04-17 22:46:06 +00:00
action:
- service: light.turn_on
data:
entity_id: group.family_room_lights
transition: 5
rgb_color: [255, 251, 245]
brightness: 255
color_temp: 162
2019-12-20 15:32:28 +00:00
# Animate Kitchen Lights ON
###############################################################################
2019-04-17 22:46:06 +00:00
# - alias: Animate Kitchen Lights ON
# initial_state: true
# trigger:
# - platform: time_pattern
# seconds: '/3'
# condition:
# - condition: state
# entity_id: input_boolean.animate_kitchen_lights
# state: 'on'
# action:
# - service: light.turn_on
# entity_id: light.dinette
# data_template:
2019-12-20 15:32:28 +00:00
# rgb_color: ['{{ (range(0, 255)|random) }}',
# '{{ (range(0, 255)|random) }}',
2019-04-17 22:46:06 +00:00
# '{{ (range(0, 255)|random) }}']
# brightness: 255
# transition: '{{ (range(1, 2)|random) }}'
2019-12-20 15:32:28 +00:00
# Animate Kitchen Lights OFF
###############################################################################
2019-04-17 22:46:06 +00:00
# - alias: Animate Kitchen Lights OFF
# initial_state: true
# trigger:
# - platform: state
# entity_id: input_boolean.animate_kitchen_lights
# to: 'off'
# action:
# - service: light.turn_on
# entity_id: light.dinette
# data:
# rgb_color: [255, 255, 255]
# brightness: 255
# color_temp: 155
2019-12-20 15:32:28 +00:00
# Long Flash All Lights
###############################################################################
2019-04-17 22:46:06 +00:00
- alias: Long Flash All Lights
initial_state: true
trigger:
- platform: state
entity_id: input_boolean.long_flash
2019-12-20 15:32:28 +00:00
to: "on"
from: "off"
2019-04-17 22:46:06 +00:00
condition:
- condition: state
entity_id: input_boolean.light_automations
2019-12-20 15:32:28 +00:00
state: "on"
2019-04-17 22:46:06 +00:00
action:
- service: light.turn_on
entity_id:
- group.all_lights
data:
flash: long
- service: input_boolean.turn_off
entity_id: input_boolean.long_flash
2019-12-20 15:32:28 +00:00
# Short Flash All Lights
###############################################################################
2019-04-17 22:46:06 +00:00
- alias: Short Flash All Lights
initial_state: true
trigger:
- platform: state
entity_id: input_boolean.short_flash
2019-12-20 15:32:28 +00:00
to: "on"
from: "off"
2019-04-17 22:46:06 +00:00
condition:
- condition: state
entity_id: input_boolean.light_automations
2019-12-20 15:32:28 +00:00
state: "on"
2019-04-17 22:46:06 +00:00
action:
- service: light.turn_on
entity_id:
- group.all_lights
data:
flash: short
- service: input_boolean.turn_off
entity_id: input_boolean.short_flash