Added theater lighting to the home automation
This commit is contained in:
parent
3d4ff5ca61
commit
561cbb2012
|
@ -195,32 +195,85 @@
|
|||
|
||||
|
||||
|
||||
# - id: show_time
|
||||
# alias: Show Time
|
||||
# initial_state: true
|
||||
# trigger:
|
||||
# - platform: state
|
||||
# entity_id: media_player.home_theater
|
||||
# to: 'playing'
|
||||
# action:
|
||||
# - service: script.turn_off
|
||||
# entity_id: script.theater_lights_up_check
|
||||
# - service: script.turn_off
|
||||
# entity_id: script.theater_lights_up
|
||||
# - service: script.turn_off
|
||||
# entity_id: script.theater_lights_out
|
||||
# - service: script.turn_on
|
||||
# entity_id: script.theater_lights_down
|
||||
- id: show_time
|
||||
alias: Show Time
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: media_player.home_theater
|
||||
to: 'playing'
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: light.theater_light
|
||||
state: 'on'
|
||||
action:
|
||||
- service: script.turn_on
|
||||
entity_id: script.theater_lights_down
|
||||
- service: script.turn_off
|
||||
entity_id: script.theater_lights_up
|
||||
|
||||
# - id: show_time_over
|
||||
# alias: Show Time Over
|
||||
# initial_state: true
|
||||
# trigger:
|
||||
# - platform: state
|
||||
# entity_id: media_player.home_theater
|
||||
# to: 'idle'
|
||||
# action:
|
||||
# - service: script.turn_on
|
||||
# entity_id: script.theater_lights_up_check
|
||||
# - service: script.turn_off
|
||||
# entity_id: script.theater_lights_down
|
||||
- id: show_time start paused
|
||||
alias: Show Time Start Paused
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: media_player.home_theater
|
||||
to: 'idle'
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: script.theater_lights_down
|
||||
state: 'on'
|
||||
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.rail_lights
|
||||
|
||||
|
||||
theater lights:
|
||||
- light.theater_light
|
||||
|
|
|
@ -67,3 +67,15 @@
|
|||
payload_off: 0
|
||||
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
|
||||
entities:
|
||||
|
@ -342,4 +342,44 @@
|
|||
- name: quiet audio
|
||||
entities:
|
||||
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
|
||||
entity_id: scene.normal_livingroom_lighting
|
||||
|
||||
# Turn off Living Room Lights if sun is up and cloud coverage is below 70%
|
||||
livingroom_lamps_off:
|
||||
# Turn off Living Room Lights if sun is up and it is sunny or partly cloudy
|
||||
livingroom_lights_off:
|
||||
sequence:
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: sun.sun
|
||||
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
|
||||
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:
|
||||
sequence:
|
||||
|
@ -68,13 +96,25 @@ kitchen_lights_night:
|
|||
|
||||
theater_lights_out:
|
||||
sequence:
|
||||
- condition: state
|
||||
entity_id: media_player.home_theater
|
||||
state: 'idle'
|
||||
- delay:
|
||||
minutes: 30
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: template
|
||||
value_template: >
|
||||
{%- 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
|
||||
entity_id: scene.theater_dark
|
||||
- service: switch.turn_off
|
||||
entity_id: switch.theater_fan
|
||||
|
||||
theater_lights_down:
|
||||
sequence:
|
||||
|
@ -85,28 +125,15 @@ theater_lights_down:
|
|||
- service: scene.turn_on
|
||||
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:
|
||||
sequence:
|
||||
- condition: state
|
||||
entity_id: media_player.home_theater
|
||||
state: 'idle'
|
||||
- service: scene.turn_on
|
||||
entity_id: scene.theater_dim
|
||||
entity_id: scene.theater_dim
|
||||
- delay:
|
||||
minutes: 1
|
||||
- service: scene.turn_on
|
||||
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"
|
||||
|
||||
|
||||
# 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
|
||||
|
||||
# - platform: mqtt
|
||||
|
|
Loading…
Reference in New Issue