Added theater lighting to the home automation
This commit is contained in:
parent
3d4ff5ca61
commit
561cbb2012
|
@ -195,32 +195,85 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# - id: show_time
|
- id: show_time
|
||||||
# alias: Show Time
|
alias: Show Time
|
||||||
# initial_state: true
|
initial_state: true
|
||||||
# trigger:
|
trigger:
|
||||||
# - platform: state
|
- platform: state
|
||||||
# entity_id: media_player.home_theater
|
entity_id: media_player.home_theater
|
||||||
# to: 'playing'
|
to: 'playing'
|
||||||
# action:
|
condition:
|
||||||
# - service: script.turn_off
|
- condition: state
|
||||||
# entity_id: script.theater_lights_up_check
|
entity_id: light.theater_light
|
||||||
# - service: script.turn_off
|
state: 'on'
|
||||||
# entity_id: script.theater_lights_up
|
action:
|
||||||
# - service: script.turn_off
|
- service: script.turn_on
|
||||||
# entity_id: script.theater_lights_out
|
entity_id: script.theater_lights_down
|
||||||
# - service: script.turn_on
|
- service: script.turn_off
|
||||||
# entity_id: script.theater_lights_down
|
entity_id: script.theater_lights_up
|
||||||
|
|
||||||
# - id: show_time_over
|
- id: show_time start paused
|
||||||
# alias: Show Time Over
|
alias: Show Time Start Paused
|
||||||
# initial_state: true
|
initial_state: true
|
||||||
# trigger:
|
trigger:
|
||||||
# - platform: state
|
- platform: state
|
||||||
# entity_id: media_player.home_theater
|
entity_id: media_player.home_theater
|
||||||
# to: 'idle'
|
to: 'idle'
|
||||||
# action:
|
condition:
|
||||||
# - service: script.turn_on
|
- condition: state
|
||||||
# entity_id: script.theater_lights_up_check
|
entity_id: script.theater_lights_down
|
||||||
# - service: script.turn_off
|
state: 'on'
|
||||||
# entity_id: script.theater_lights_down
|
action:
|
||||||
|
- service: script.turn_off
|
||||||
|
entity_id: script.theater_lights_down
|
||||||
|
|
||||||
|
- id: show_time_over
|
||||||
|
alias: Show Time over
|
||||||
|
initial_state: true
|
||||||
|
trigger:
|
||||||
|
- platform: state
|
||||||
|
entity_id: media_player.home_theater
|
||||||
|
to: 'idle'
|
||||||
|
for:
|
||||||
|
seconds: 35
|
||||||
|
condition:
|
||||||
|
- condition: state
|
||||||
|
entity_id: media_player.home_theater
|
||||||
|
state: 'idle'
|
||||||
|
action:
|
||||||
|
- service: script.turn_on
|
||||||
|
entity_id: script.theater_lights_up
|
||||||
|
- service: script.turn_off
|
||||||
|
entity_id: script.theater_lights_down
|
||||||
|
|
||||||
|
- id: theater_fan_on
|
||||||
|
alias: Theater Fan On
|
||||||
|
initial_state: true
|
||||||
|
trigger:
|
||||||
|
- above: '74'
|
||||||
|
platform: numeric_state
|
||||||
|
entity_id: sensor.theater_temperature
|
||||||
|
action:
|
||||||
|
- data:
|
||||||
|
entity_id: switch.theater_fan
|
||||||
|
service: switch.turn_off
|
||||||
|
|
||||||
|
- id: theater_light_pressed_up
|
||||||
|
alias: Theater Light Pressed Up
|
||||||
|
initial_state: true
|
||||||
|
trigger:
|
||||||
|
- platform: state
|
||||||
|
entity_id: sensor.theater_light_up
|
||||||
|
action:
|
||||||
|
- service: scene.turn_on
|
||||||
|
entity_id: scene.theater_bright
|
||||||
|
|
||||||
|
- id: theater_light_pressed_down
|
||||||
|
alias: Theater Light Pressed Down
|
||||||
|
initial_state: true
|
||||||
|
trigger:
|
||||||
|
- platform: state
|
||||||
|
entity_id: sensor.theater_light_down
|
||||||
|
action:
|
||||||
|
- service: scene.turn_on
|
||||||
|
entity_id: scene.theater_dark
|
||||||
|
|
|
@ -70,4 +70,5 @@ livingroom:
|
||||||
- switch.fireplace_lights
|
- switch.fireplace_lights
|
||||||
- switch.rail_lights
|
- switch.rail_lights
|
||||||
|
|
||||||
|
theater lights:
|
||||||
|
- light.theater_light
|
||||||
|
|
|
@ -67,3 +67,15 @@
|
||||||
payload_off: 0
|
payload_off: 0
|
||||||
retain: true
|
retain: true
|
||||||
|
|
||||||
|
|
||||||
|
# Theater
|
||||||
|
|
||||||
|
- platform: mqtt
|
||||||
|
name: Theater Light
|
||||||
|
command_topic: "zwave2mqtt/theater/38/1/0/set"
|
||||||
|
brightness_command_topic: "zwave2mqtt/theater/38/1/0/set"
|
||||||
|
brightness_scale: 99
|
||||||
|
brightness_state_topic: "zwave2mqtt/theater/38/1/0"
|
||||||
|
on_command_type: "brightness"
|
||||||
|
payload_off: 0
|
||||||
|
retain: true
|
||||||
|
|
|
@ -331,7 +331,7 @@
|
||||||
|
|
||||||
|
|
||||||
#######################################
|
#######################################
|
||||||
# Home Theater
|
# Home Audio
|
||||||
|
|
||||||
- name: normal audio
|
- name: normal audio
|
||||||
entities:
|
entities:
|
||||||
|
@ -342,4 +342,44 @@
|
||||||
- name: quiet audio
|
- name: quiet audio
|
||||||
entities:
|
entities:
|
||||||
media_player.tsr_6750_a3ed2f:
|
media_player.tsr_6750_a3ed2f:
|
||||||
state: off
|
state: off
|
||||||
|
|
||||||
|
#######################################
|
||||||
|
# Home Theather
|
||||||
|
|
||||||
|
- name: theater dark
|
||||||
|
entities:
|
||||||
|
group.theater_lights:
|
||||||
|
state: off
|
||||||
|
|
||||||
|
- name: theater dim
|
||||||
|
entities:
|
||||||
|
group.theater_lights:
|
||||||
|
state: on
|
||||||
|
brightness: 40
|
||||||
|
|
||||||
|
- name: theater bright
|
||||||
|
entities:
|
||||||
|
group.theater_lights:
|
||||||
|
state: on
|
||||||
|
brightness: 255
|
||||||
|
|
||||||
|
#######################################
|
||||||
|
# Skylar
|
||||||
|
# - name: Skylar Full
|
||||||
|
# entities:
|
||||||
|
# input_number.skylar_tv_time: 120
|
||||||
|
# input_number.skylar_ps_time: 120
|
||||||
|
# input_number.skylar_yt_time: 60
|
||||||
|
|
||||||
|
# - name: Skylar restricted
|
||||||
|
# entities:
|
||||||
|
# input_number.skylar_tv_time: 0
|
||||||
|
# input_number.skylar_ps_time: 0
|
||||||
|
# input_number.skylar_yt_time: 0
|
||||||
|
|
||||||
|
# - name: Skylar Limited
|
||||||
|
# entities:
|
||||||
|
# input_number.skylar_tv_time: 60
|
||||||
|
# input_number.skylar_ps_time: 60
|
||||||
|
# input_number.skylar_yt_time: 0
|
||||||
|
|
|
@ -17,16 +17,44 @@ livingroom_lamps_on:
|
||||||
- service: scene.turn_on
|
- service: scene.turn_on
|
||||||
entity_id: scene.normal_livingroom_lighting
|
entity_id: scene.normal_livingroom_lighting
|
||||||
|
|
||||||
# Turn off Living Room Lights if sun is up and cloud coverage is below 70%
|
# Turn off Living Room Lights if sun is up and it is sunny or partly cloudy
|
||||||
livingroom_lamps_off:
|
livingroom_lights_off:
|
||||||
sequence:
|
sequence:
|
||||||
- condition: and
|
- condition: and
|
||||||
conditions:
|
conditions:
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: sun.sun
|
entity_id: sun.sun
|
||||||
state: 'above_horizon'
|
state: 'above_horizon'
|
||||||
|
- condition: state
|
||||||
|
entity_id: binary_sensor.living_room_occupancy
|
||||||
|
state: 'off'
|
||||||
|
- condition: template
|
||||||
|
value_template: >
|
||||||
|
{%- if states.weather.home.state == "sunny" or states.weather.home.state == "partlycloudy" -%}
|
||||||
|
true
|
||||||
|
{%- endif -%}
|
||||||
- service: group.turn_off
|
- service: group.turn_off
|
||||||
entity_id: group.livingroom_lamps
|
entity_id: group.livingroom
|
||||||
|
|
||||||
|
|
||||||
|
# Turn off Kitchen Lights if sun is up and it is sunny or partly cloudy
|
||||||
|
kitchen_lights_off:
|
||||||
|
sequence:
|
||||||
|
- condition: and
|
||||||
|
conditions:
|
||||||
|
- condition: state
|
||||||
|
entity_id: sun.sun
|
||||||
|
state: 'above_horizon'
|
||||||
|
- condition: state
|
||||||
|
entity_id: binary_sensor.kitchen_occupancy
|
||||||
|
state: 'off'
|
||||||
|
- condition: template
|
||||||
|
value_template: >
|
||||||
|
{%- if states.weather.home.state == "sunny" or states.weather.home.state == "partlycloudy" -%}
|
||||||
|
true
|
||||||
|
{%- endif -%}
|
||||||
|
- service: group.turn_off
|
||||||
|
entity_id: group.kitchen
|
||||||
|
|
||||||
good_night_loft:
|
good_night_loft:
|
||||||
sequence:
|
sequence:
|
||||||
|
@ -68,13 +96,25 @@ kitchen_lights_night:
|
||||||
|
|
||||||
theater_lights_out:
|
theater_lights_out:
|
||||||
sequence:
|
sequence:
|
||||||
- condition: state
|
- condition: and
|
||||||
entity_id: media_player.home_theater
|
conditions:
|
||||||
state: 'idle'
|
- condition: template
|
||||||
- delay:
|
value_template: >
|
||||||
minutes: 30
|
{%- if states.media_player.home_theater != "playing" -%}
|
||||||
|
true
|
||||||
|
{%- endif -%}
|
||||||
|
- condition: template
|
||||||
|
value_template: >
|
||||||
|
{%- if states.media_player.playstation_4 != "playing" -%}
|
||||||
|
true
|
||||||
|
{%- endif -%}
|
||||||
|
- condition: state
|
||||||
|
entity_id: binary_sensor.theater_occupancy
|
||||||
|
state: 'off'
|
||||||
- service: scene.turn_on
|
- service: scene.turn_on
|
||||||
entity_id: scene.theater_dark
|
entity_id: scene.theater_dark
|
||||||
|
- service: switch.turn_off
|
||||||
|
entity_id: switch.theater_fan
|
||||||
|
|
||||||
theater_lights_down:
|
theater_lights_down:
|
||||||
sequence:
|
sequence:
|
||||||
|
@ -85,28 +125,15 @@ theater_lights_down:
|
||||||
- service: scene.turn_on
|
- service: scene.turn_on
|
||||||
entity_id: scene.theater_dark
|
entity_id: scene.theater_dark
|
||||||
|
|
||||||
theater_lights_up_check:
|
|
||||||
sequence:
|
|
||||||
- delay:
|
|
||||||
seconds: 20
|
|
||||||
- service: script.turn_on
|
|
||||||
entity_id: script.theater_lights_up
|
|
||||||
|
|
||||||
theater_lights_up:
|
theater_lights_up:
|
||||||
sequence:
|
sequence:
|
||||||
- condition: state
|
|
||||||
entity_id: media_player.home_theater
|
|
||||||
state: 'idle'
|
|
||||||
- service: scene.turn_on
|
- service: scene.turn_on
|
||||||
entity_id: scene.theater_dim
|
entity_id: scene.theater_dim
|
||||||
- delay:
|
- delay:
|
||||||
minutes: 1
|
minutes: 1
|
||||||
- service: scene.turn_on
|
- service: scene.turn_on
|
||||||
entity_id: scene.theater_bright
|
entity_id: scene.theater_bright
|
||||||
- delay:
|
|
||||||
minutes: 5
|
|
||||||
- service: script.turn_on
|
|
||||||
entity_id: script.theater_lights_out
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -138,6 +138,16 @@
|
||||||
payload_off: "false"
|
payload_off: "false"
|
||||||
|
|
||||||
|
|
||||||
|
# Theater:
|
||||||
|
|
||||||
|
- platform: mqtt
|
||||||
|
name: "Theater Fan"
|
||||||
|
state_topic: "zwave2mqtt/theater/37/2/0"
|
||||||
|
command_topic: "zwave2mqtt/theater/37/2/0/set"
|
||||||
|
payload_on: "true"
|
||||||
|
payload_off: "false"
|
||||||
|
|
||||||
|
|
||||||
# alarm
|
# alarm
|
||||||
|
|
||||||
# - platform: mqtt
|
# - platform: mqtt
|
||||||
|
|
Loading…
Reference in New Issue