############################################################################### # @author : Mahasri Kalavala # @date : 04/15/2017 # @package : TV # @description : Tv Automations ############################################################################### binary_sensor: - platform: mqtt name: Sharp TV state_topic: "/home/sharptv" payload_on: "on" payload_off: "off" value_template: "{{ value }}" - platform: mqtt name: Sharp TV Command State state_topic: "/home/sharp_tv_cmd" payload_on: "on" payload_off: "off" value_template: "{{ value }}" ############################################################################### # _ _ _ # /\ | | | | (_) # / \ _ _| |_ ___ _ __ ___ __ _| |_ _ ___ _ __ ___ # / /\ \| | | | __/ _ \| '_ ` _ \ / _` | __| |/ _ \| '_ \/ __| # / ____ \ |_| | || (_) | | | | | | (_| | |_| | (_) | | | \__ \ # /_/ \_\__,_|\__\___/|_| |_| |_|\__,_|\__|_|\___/|_| |_|___/ # ############################################################################### automation: # 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 # Dim Family Room Lights When TV is Turned ON ############################################################################### - alias: TV Dim Indoor Lights when TV is ON initial_state: true trigger: platform: state entity_id: binary_sensor.sharp_tv from: "off" to: "on" condition: - condition: state entity_id: sun.sun state: "below_horizon" - condition: state entity_id: input_boolean.light_automations state: "on" action: - service: light.turn_on data: entity_id: light.hue_color_lamp_1 brightness: 5 color_temp: 154 - service: light.turn_on data: entity_id: light.hue_color_lamp_2 brightness: 5 color_temp: 154 - service: light.turn_on data: entity_id: light.hue_color_lamp_3 brightness: 5 color_temp: 154 # Turn back Family room lights when TV is switched OFF ############################################################################### - alias: TV Turn Lights ON When TV is turned OFF initial_state: true trigger: platform: state entity_id: binary_sensor.sharp_tv to: "off" condition: - condition: state entity_id: sun.sun state: "below_horizon" - condition: state entity_id: input_boolean.light_automations state: "on" action: - service: light.turn_on data: entity_id: light.hue_color_lamp_1 brightness: 255 color_temp: 154 transition: 5 - service: light.turn_on data: entity_id: light.hue_color_lamp_2 brightness: 255 color_temp: 154 transition: 5 - service: light.turn_on data: entity_id: light.hue_color_lamp_3 brightness: 255 color_temp: 154 transition: 5