- id: outside_accent_lights alias: Outside Accent Lights description: Turn on the exterior outside lights 30 minutes before sunset, and turn them off again 30 minutes after sunrise. triggers: - id: 'on' alias: 30m Before Sunset trigger: sun event: sunset offset: -00:30:00 - id: 'off' alias: 30m After Sunrise trigger: sun event: sunrise offset: 00:30:00 actions: - alias: Update Light State action: light.turn_{{ trigger.id }} data: entity_id: light.outdoor_accent_lights - id: office_zen34 alias: Office ZEN34 Remote variables: scene_key_up: '001' scene_key_down: '002' triggers: - id: zjs_scene_trigger alias: Z-Wave Scene Change Event platform: event event_type: zwave_js_value_notification event_data: node_id: 256 property: scene actions: - alias: Determine Button choose: - alias: Up Paddle conditions: - condition: template value_template: '{{ trigger.event.data.property_key == scene_key_up }}' sequence: - choose: - alias: Pressed Once conditions: - condition: template value_template: '{{ trigger.event.data.value == "KeyPressed" }}' sequence: - action: light.turn_on target: entity_id: light.office_ceiling_fan - alias: Pressed Twice conditions: - condition: template value_template: '{{ trigger.event.data.value == "KeyPressed2x" }}' sequence: - action: fan.turn_on data: percentage: 66 target: entity_id: fan.office_ceiling_fan - alias: Pressed Three Times conditions: - condition: template value_template: '{{ trigger.event.data.value == "KeyPressed3x" }}' sequence: - parallel: - action: light.turn_on target: entity_id: light.office_ceiling_fan - action: fan.turn_on data: percentage: 66 target: entity_id: fan.office_ceiling_fan - alias: Down Paddle conditions: - condition: template value_template: '{{ trigger.event.data.property_key == scene_key_down }}' sequence: - choose: - alias: Pressed Once conditions: - condition: template value_template: '{{ trigger.event.data.value == "KeyPressed" }}' sequence: - parallel: - action: light.turn_off target: entity_id: light.office_ceiling_fan - action: fan.turn_off target: entity_id: fan.office_ceiling_fan - alias: Pressed Twice conditions: - condition: template value_template: '{{ trigger.event.data.value == "KeyPressed2x" }}' sequence: - action: fan.turn_off target: entity_id: fan.office_ceiling_fan - id: living_room_fireplace_color_changed alias: 'Living Room Fireplace: Sync Rock & Flame State' description: Sync the color of the Rocks for the Living Room Fireplace from the input_select, then sync the color of the Living Room Fireplace Flames, since changing the rock color turns off flames. mode: restart triggers: - alias: When the Living Room Fireplace turns on trigger: state entity_id: input_boolean.living_room_fireplace_state to: 'on' - alias: When the Rock Color changes trigger: state entity_id: input_select.living_room_fireplace_rocks_effect - alias: When the Flame Color changes trigger: state entity_id: input_select.living_room_fireplace_flames_effect conditions: - alias: The Living Room Fireplace is On condition: state entity_id: input_boolean.living_room_fireplace_state state: 'on' actions: - action: remote.send_command target: entity_id: remote.living_room_ir_controller data: command: "{%\n set commands = {\n 'Off': 'b64:JgBGAM7mEhURFxI1EBYRFhEWEhURFREWETYRNxA2EhURFhEVERYQFxIVEDYRFhE2ERYRFhEWETYQNxE2ERYRNhI2DxcRFhEADQU=',\n\ \ 'Blue': 'b64:JgBGAM/nERYRFhI1EhUSFREXERUQFxE1ETYSNhAWERcQFhEVERcRFREWETYQGBE0EhYQFxEVETcSNhE2EBYROBE0ERYRFhEADQU=',\n\ \ 'Dark Blue': 'b64:JgBKAAYAAiLQ5RIWEhQSNhEVEhYRFREVEhURNhEVEhYROBEWERYQFRIVExURFRE1EhcRNxAVEhQSFxA2ETYSNRIVETYTNhEUEhUSAA0F',\n\ \ 'Green': 'b64:JgBKAMzoERYSFRE4ERYRFREVEhYRFxEUERUSNhIVEhUSFRIXEhUSFRIWETgRFRE2EhUSFBEWETYRNhI1ExUROBA1ERUSFhEACGgEAA0F',\n\ \ 'Light Blue': 'b64:JgBKAAsACJ/M6REVEhQRNhIVEhYRFhEVEhQRFhAYEBYRNREWEhYRFhEVERURFxE1ERYQNxEWEBgQFBI4ETURNxAWEjURNhAXEBYSAA0F',\n\ \ 'Light Purple': 'b64:JgBGAM3oERUTFRA4EBYSFRIVEBYSFhEUEjURFxE4ERURFxAXERYQFREWETcRFRA5ERUQFw4YETUSNxA0ExcQNhE3ERUSFBIADQU=',\n\ \ 'Lime Green': 'b64:JgBGAM7mEhUSFhI3EBYSFhEUERcRFRE2ETYSFREWERURFhIVEhURFREWEjUSFhA5ERURFRIVETYRNhE3ERUSNhA2EhURFhIADQU=',\n\ \ 'Neon Green': 'b64:JgBGAM3oEhUSFBI4ERURFhEWERURFhIzEhUSNhIVERYRFxEUERcRFhEWEDYQGBE1ERQRFxEWETYRNhM1EBYRNBU1ExQRFREADQU=',\n\ \ 'Orange': 'b64:JgBGANDlEhURFhI2ERYRFRIVEhUSFREUEzUSFBMVEhYTFRIWERUSFhMVEjUSFRM1ERYQFhEWETUSNhM0ExUTNRI1ERYRFRIADQU=',\n\ \ 'Pink': 'b64:JgBGAM3oEhUSFBE3EhYRFhEVERYRFRIVEhYRNBE3EhURFhEWERUSFREWEjURFhE1EhUTFBEWEDcQNxE2EhQSNxE1EhYSFREADQU=',\n\ \ 'Purple': 'b64:JgBGAM/mEhURFRE3EhUSFhEUEhURFhI1ETYSFhA1EhUSFhEVEhURFRIXEDYRFRE4ERURFBIWETYRNhE3ERQSNhE3ERUSFBEADQU=',\n\ \ 'Red': 'b64:JgBGANDmERURFRM0EhUSFRIVEhQSFRI1ERYSFREWERUSFBMVEhURFRIUEzYSFRE1EhYSFREUEjcTMxI1ERUTNxIzEhYRFhIADQU=',\n\ \ 'RGB Rainbow': 'b64:JgBGAM3nEhYQFxE2EhURFhIVERYRFRI0EhUSNhE3EBcRFREVERYSFhAWETYRFxE0ERYSFRIVETcQNhE1EhYRNxE1ERUSFhEADQU=',\n\ \ 'Turquoise': 'b64:JgBGAMzoEhYRFRE2ERcQFREWERYQFRMVETYROBEUERcQFw8XERURFw8YDjgRFhA2EhcRFBIWEDYRNxE2EhYQNRI2ExURFRIADQU=',\n\ \ 'White': 'b64:JgBGAM3oEhYRFRE3ERUUExEWEhUSExIWERYSFRIVERQTFREWEhMSFRIWEjQSFRI4ERUSFREVEjYRNhI0ExUSNBI2EhURFREADQU=',\n\ \ }\n%} {{ commands.get(states('input_select.living_room_fireplace_rocks_effect'))\ \ }}" - action: remote.send_command target: entity_id: remote.living_room_ir_controller data: command: "{%\n set commands = {\n 'Off': 'b64:JgBGAM7nEhUSFBI2ExQSFRIVEhQRFhIVEhUSMxIWEhQSFBMVEhUUFREVEjYRFRM1ERUSFRIVEhQSNhITEjcSNRI1EhQSFREADQU=',\n\ \ 'Blue': 'b64:JgBGAM/nEjURNxITEhUSFRIWEhMSFRI3EjQSFBIVEhUTFBIVERUSFRIWEjUSFRI1EhUSFBIVEhQTNRIVEjQTNhI2EhQTFREADQU=',\n\ \ 'Orange': 'b64:JgBGAM7mEjYSFRIVEhMSFhIVEhUSExI2ERUSFBIVEhUSFRMUExUTFRIVEjYSFBI1ERYRFRIVEhURNxIVETYSNRE1EhYSFREADQU=',\n\ \ 'Orange / Purple': 'b64:JgBGAM/mEhUSFRIUEhQTFRIVExUSFBIWEhUTFRMUEhYSFRMVEhQSFRQVEjQSFRI2EhQSFRIVEhUSNBIVEjUSNxI0EhURFRIADQU=',\n\ \ 'Purple / Orange': 'b64:JgBGAM3nEhYSNRIVEhQSFhIUEhUSFBIVEzMSFRIVEhURFRMVEhUTFBMVEjcSExI3ERUSFBIVEhYRNRIUEjcSNBM0ExUSFREADQU=',\n\ \ }\n%} {{ commands.get(states('input_select.living_room_fireplace_flames_effect'))\ \ }}" - id: garage_auto_open alias: Automatically Open the Garage Door when leaving description: Automatically open the garage door when the Foyer Door opens while the security panel is armed. triggers: - alias: When the Foyer Door opens trigger: state entity_id: binary_sensor.qolsys_iq4_alarm_panel_foyer_door to: 'on' conditions: - alias: The Security Panel is being Armed condition: state entity_id: alarm_control_panel.qolsys_iq4_alarm_panel_system state: arming actions: - alias: Open the Garage Door action: cover.open_cover target: entity_id: cover.ratgdo32_disco_door - id: garage_interior_lights_off alias: Turn Off Garage Interior Lights triggers: - alias: The Foyer Door has been Closed for 5 Minutes trigger: state entity_id: binary_sensor.qolsys_iq4_alarm_panel_foyer_door from: 'on' to: 'off' for: minutes: 5 - alias: The Garage Service Door has been Closed for 5 minutes trigger: state entity_id: binary_sensor.qolsys_iq4_alarm_panel_garage_man_door from: 'on' to: 'off' for: minutes: 5 - alias: The Garage Interia Camera stops detecting a person for 5 minutes trigger: state entity_id: binary_sensor.garage_interior_person_detected from: 'on' to: 'off' for: minutes: 5 - alias: The Garage Door has been Open for 5 minutes trigger: state entity_id: cover.ratgdo32_disco_door to: open for: minutes: 5 conditions: - alias: The Garage Interior Camera is not detecting a person condition: not conditions: - condition: state entity_id: binary_sensor.garage_interior_person_detected state: 'on' - alias: The Garage Interior Lights are On condition: state entity_id: light.garage_lights state: 'on' actions: - alias: Turn Off the Garage Interior Lights action: light.turn_off entity_id: light.garage_lights - id: garage_interior_lights_on alias: Turn On Garage Interior Lights triggers: - alias: The Foyer Door opens trigger: state entity_id: binary_sensor.qolsys_iq4_alarm_panel_foyer_door to: 'on' - alias: The Garage Service Door opens trigger: state entity_id: binary_sensor.qolsys_iq4_alarm_panel_garage_man_door to: 'on' - alias: The Garage Interia camera detects a person trigger: state entity_id: binary_sensor.garage_interior_person_detected from: 'off' to: 'on' - alias: The Garage Door Opens trigger: state entity_id: cover.ratgdo32_disco_door to: - open - opening conditions: - or: - alias: The Garage Door is currently closed condition: state entity_id: cover.ratgdo32_disco_door state: closed - alias: It is Night Time condition: sun after: sunset after_offset: -00:30:00 before: sunrise before_offset: 00:30:00 actions: - alias: Turn On the Garage Interior Lights action: light.turn_on entity_id: light.garage_lights - id: master_bathroom_lights_off alias: Master Bathroom Lights Off description: Turn off all Master Bathroom related lights when some lights turn off. mode: restart triggers: - id: lights_off alias: Bathroom Lights turned off trigger: state entity_id: light.master_bathroom_lights from: 'on' to: 'off' - id: shower_lights_off alias: Shower Lights turned off trigger: state entity_id: light.master_bathroom_shower_lights from: 'on' to: 'off' actions: - alias: Turn off all related lights parallel: - action: light.turn_off target: entity_id: - light.master_bathroom_lights - light.master_bathroom_shower_lights - light.master_bathroom_toilet_light data: transition: 2 - action: switch.turn_off target: entity_id: switch.master_closet_light - id: master_bathroom_shade_via_switch alias: Master Bathroom Shade Control description: Control the window shade in the master bathroom with the dimmer for the bathroom lights. Pressing the up button three times opens the shade, and the down button three times closes it. variables: scene_key_up: '001' scene_key_down: '002' triggers: - id: light_button_press_3x alias: Light Switch Button Pressed 3x platform: event event_type: zwave_js_value_notification event_data: node_id: 15 property: scene value: KeyPressed3x actions: - alias: Determine Button choose: - alias: Up Paddle conditions: - condition: template value_template: '{{ trigger.event.data.property_key == scene_key_up }}' sequence: - action: cover.set_cover_position target: entity_id: cover.master_bathroom_shade data: position: 65 - alias: Down Paddle conditions: - condition: template value_template: '{{ trigger.event.data.property_key == scene_key_down }}' sequence: - alias: Close the Shade action: cover.set_cover_position target: entity_id: cover.master_bathroom_shade data: position: 0 - id: master_bathroom_shower_fan alias: Master Bathroom Shower Fan Control description: Turn on the bathroom fan when the shower is running, and keep it running for 20 minutes after the shower turns off. triggers: - id: shower_turned_on alias: The Shower was turned on trigger: state entity_id: switch.u_by_moen_037d8f from: 'off' to: 'on' - id: shower_turned_off alias: The Shower was turned off trigger: state entity_id: switch.u_by_moen_037d8f from: 'on' to: 'off' - id: master_bathroom_fan_cooldown_complete alias: Shower Fan Cooldown Complete trigger: event event_type: timer.finished event_data: entity_id: timer.master_bathroom_fan_cooldown actions: - choose: - alias: Cancel the fan cooldown timer when the shower turns on conditions: - condition: trigger id: shower_turned_on sequence: - action: timer.cancel target: entity_id: timer.master_bathroom_fan_cooldown - alias: Start the fan cooldown timer when the shower turns off conditions: - condition: trigger id: shower_turned_off sequence: - action: timer.start target: entity_id: timer.master_bathroom_fan_cooldown data: duration: 00:20:00 - alias: Turn off the fan after the cooldown timer finishes conditions: - condition: trigger id: master_bathroom_fan_cooldown_complete sequence: - action: switch.turn_off target: entity_id: switch.master_bathroom_fan - id: master_bathroom_shower_prep alias: Master Bathroom Shower Prep description: Setup the Master Bathroom for a Shower when the shower is turned on or the up button on the bathroom fan switch is pressed twice. variables: scene_key_up: '001' triggers: - id: fan_switch_up_button_2x alias: Fan Up Button Pressed 2x platform: event event_type: zwave_js_value_notification event_data: node_id: 19 property: scene property_key: '001' value: KeyPressed2x - id: shower_turned_on alias: The Shower was turned on trigger: state entity_id: switch.u_by_moen_037d8f from: 'off' to: 'on' actions: - alias: Activate Shower Prep Scene action: scene.turn_on target: entity_id: scene.master_bathroom_start_shower data: transition: 2.0 - id: finished_basement_theater alias: Home Theater description: Automation for the Theater in the Finished Basement, currently only handling lighting. mode: restart variables: trigger_state_mixin: not_from: &id001 - unavailable - unknown not_to: &id002 - unavailable - unknown - buffering triggers: - not_from: *id001 not_to: *id002 alias: When the Basement TV Chnges State trigger: state entity_id: media_player.basement_tv - not_from: *id001 not_to: *id002 alias: When the Basement TV Playback Chnges State trigger: state entity_id: media_player.basement_tv_cast actions: - choose: - conditions: - alias: TV Turned Off condition: state entity_id: media_player.basement_tv state: 'off' sequence: - action: scene.turn_on target: entity_id: scene.movie_over data: transition: 2.0 - conditions: - alias: TV On condition: state entity_id: media_player.basement_tv state: 'on' - or: - alias: Not Playing Media condition: state entity_id: media_player.basement_tv_cast state: - 'off' - idle - standby - alias: Paused condition: state entity_id: media_player.basement_tv_cast state: paused for: seconds: 10 sequence: - action: scene.turn_on target: entity_id: scene.movie_time data: transition: 2.0 - conditions: - alias: TV On condition: state entity_id: media_player.basement_tv state: 'on' - alias: Playing Media condition: state entity_id: media_player.basement_tv_cast state: playing sequence: - action: scene.turn_on target: entity_id: scene.movie_in_progress data: transition: 2.0 - id: living_room_tv_off_fireplace_off alias: 'Living Room TV Off: Fireplace Off' description: Turn off the Fireplace if it is on and the TV turns off triggers: - alias: When the Living Room TV Turns Off trigger: state entity_id: media_player.living_room_stream_box not_from: - unavailable - unknown to: 'off' conditions: - alias: The Living Room Fireplace is On condition: state entity_id: light.living_room_fireplace state: 'on' actions: - action: light.turn_off target: entity_id: light.living_room_fireplace - id: living_room_tv_mood_lights alias: Evening Living Room TV Mood Lighting description: Configure lights for some nice mood lighting if the TV is turned on in the evening. triggers: - id: sunset alias: 30m Before Sunset trigger: sun event: sunset offset: -00:30:00 - id: tv_on alias: When the Living Room TV Turns On trigger: state entity_id: - media_player.living_room_stream_box to: 'on' conditions: - alias: 30m before Sunset until Sunrise condition: sun after: sunset after_offset: -00:30:00 before: sunrise - alias: The Living Room TV Is On condition: state entity_id: media_player.living_room_stream_box state: 'on' actions: - action: scene.turn_on target: entity_id: scene.night_tv data: transition: 5.0 - id: master_bedroom_zen34 alias: Master Bedroom ZEN34 Remote variables: scene_key_up: '001' scene_key_down: '002' triggers: - id: zjs_scene_trigger alias: Z-Wave Scene Change Event platform: event event_type: zwave_js_value_notification event_data: node_id: 257 property: scene actions: - alias: Determine Button choose: - alias: Up Paddle conditions: - condition: template value_template: '{{ trigger.event.data.property_key == scene_key_up }}' sequence: - choose: - alias: Pressed Once conditions: - condition: template value_template: '{{ trigger.event.data.value == "KeyPressed" }}' sequence: - action: light.turn_on target: entity_id: light.master_bedroom_ceiling_fan - alias: Pressed Twice conditions: - condition: template value_template: '{{ trigger.event.data.value == "KeyPressed2x" }}' sequence: - action: fan.turn_on data: percentage: 66 target: entity_id: - fan.master_bedroom_ceiling_fan - fan.master_bedroom_pedestal_fan - alias: Down Paddle conditions: - condition: template value_template: '{{ trigger.event.data.property_key == scene_key_down }}' sequence: - choose: - alias: Pressed Once conditions: - condition: template value_template: '{{ trigger.event.data.value == "KeyPressed" }}' sequence: - action: light.turn_off target: entity_id: light.master_bedroom_ceiling_fan - alias: Pressed Twice conditions: - condition: template value_template: '{{ trigger.event.data.value == "KeyPressed2x" }}' sequence: - action: scene.turn_on target: entity_id: scene.master_bedroom_end_sleep - alias: Pressed Three Times conditions: - condition: template value_template: '{{ trigger.event.data.value == "KeyPressed3x" }}' sequence: - action: fan.turn_off target: entity_id: - fan.master_bedroom_ceiling_fan - fan.master_bedroom_pedestal_fan