############################################################################### # @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 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 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 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: icon: mdi:flash friendly_name: Long Flash input_boolean.animate_downstairs_lights: icon: mdi:flash-outline friendly_name: Animate Family Room Lights 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: # 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 - host: !secret tplink_front_room # 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 wemo: discovery: false 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 script: xiaomi_red: sequence: - service: light.turn_on data: entity_id: light.gateway_light_34ce008ad65d brightness: 255 rgb_color: [255, 0, 0] xiaomi_blue: sequence: - service: light.turn_on data: entity_id: light.gateway_light_34ce008ad65d brightness: 255 rgb_color: [0, 0, 255] xiaomi_green: sequence: - service: light.turn_on data: entity_id: light.gateway_light_34ce008ad65d brightness: 255 rgb_color: [0, 255, 0] ############################################################################### # _ _ _ # /\ | | | | (_) # / \ _ _| |_ ___ _ __ ___ __ _| |_ _ ___ _ __ ___ # / /\ \| | | | __/ _ \| '_ ` _ \ / _` | __| |/ _ \| '_ \/ __| # / ____ \ |_| | || (_) | | | | | | (_| | |_| | (_) | | | \__ \ # /_/ \_\__,_|\__\___/|_| |_| |_|\__,_|\__|_|\___/|_| |_|___/ # ############################################################################### automation: # Animate Master Bedroom Lights ############################################################################### - alias: Animate Master Bedroom Lights initial_state: true trigger: platform: time_pattern seconds: "/5" condition: - condition: state entity_id: input_boolean.animate_upstairs_lights state: "on" - condition: state entity_id: input_boolean.light_automations state: "on" action: - service: light.turn_on data: entity_id: group.master_bedroom_lights transition: 5 brightness: 255 color_temp: 366 data_template: 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 ############################################################################### - alias: Restore Masterbedroom Lights initial_state: true trigger: platform: state entity_id: input_boolean.animate_upstairs_lights to: "off" condition: - condition: state entity_id: input_boolean.light_automations state: "on" action: - service: light.turn_on data: entity_id: group.master_bedroom_lights transition: 5 rgb_color: [224, 175, 102] brightness: 10 color_temp: 366 # Animate Familyroom Lights ############################################################################### - alias: Animate Familyroom Lights initial_state: true trigger: platform: time_pattern seconds: "/5" condition: - condition: state entity_id: input_boolean.animate_downstairs_lights state: "on" - condition: state entity_id: input_boolean.light_automations state: "on" action: - service: light.turn_on data: entity_id: group.family_room_lights transition: 5 brightness: 255 color_temp: 366 data_template: 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 ############################################################################### - alias: Restore Familyroom Lights initial_state: true trigger: platform: state entity_id: input_boolean.animate_downstairs_lights to: "off" condition: - condition: state entity_id: input_boolean.light_automations state: "on" action: - service: light.turn_on data: entity_id: group.family_room_lights transition: 5 rgb_color: [255, 251, 245] brightness: 255 color_temp: 162 # Animate Kitchen Lights ON ############################################################################### # - 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: # rgb_color: ['{{ (range(0, 255)|random) }}', # '{{ (range(0, 255)|random) }}', # '{{ (range(0, 255)|random) }}'] # brightness: 255 # transition: '{{ (range(1, 2)|random) }}' # Animate Kitchen Lights OFF ############################################################################### # - 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 # Long Flash All Lights ############################################################################### - alias: Long Flash All Lights initial_state: true trigger: - platform: state entity_id: input_boolean.long_flash to: "on" from: "off" condition: - condition: state entity_id: input_boolean.light_automations state: "on" action: - service: light.turn_on entity_id: - group.all_lights data: flash: long - service: input_boolean.turn_off entity_id: input_boolean.long_flash # Short Flash All Lights ############################################################################### - alias: Short Flash All Lights initial_state: true trigger: - platform: state entity_id: input_boolean.short_flash to: "on" from: "off" condition: - condition: state entity_id: input_boolean.light_automations state: "on" action: - service: light.turn_on entity_id: - group.all_lights data: flash: short - service: input_boolean.turn_off entity_id: input_boolean.short_flash