Updated living room lights to reflect door/window/garage status with colors.

This commit is contained in:
ccostan 2018-01-08 20:49:59 -05:00
parent 7d14965d73
commit cd1eba3d10
3 changed files with 43 additions and 38 deletions

View File

@ -19,34 +19,7 @@
call_garage_check: 1
call_window_check: 1
- service: light.turn_on
entity_id:
- group.living_room_accents
data_template:
color_name: >
{% if states.group.entry_points.state == 'on' or states.group.all_covers.state != 'closed' -%}
red
{% else %}
gold
{% endif %}
- wait_template: >-
{{ not is_state('group.entry_points', 'on') }}
- wait_template: >-
{{ is_state('group.all_covers', 'closed') }}
- wait_template: >-
{{ not is_state('media_player.livingroomCC', 'playing') }}
- service: switch.turn_off
entity_id: switch.living_room_amp
- service: light.turn_on
entity_id:
- group.living_room_accents
data_template:
color_name: >
{% if states.group.entry_points.state == 'on' or states.group.all_covers.state != 'closed' -%}
red
{% else %}
gold
{% endif %}

View File

@ -7,15 +7,15 @@ homeassistant:
customize_glob:
"device_tracker.nodemcu*":
icon: mdi:chip
hidden: True
"sensor.nodemcu*":
icon: mdi:alarm-bell
hidden: False
"binary_sensor.mcu?_gpio*":
icon: mdi:security-home
hidden: False
customize:
@ -289,6 +289,37 @@ automation:
entity_id: climate.downstairs
operation_mode: 'auto'
#-------------------------------------------#-------------------------------------------
- alias: 'Alarm lights in Living room'
trigger:
- platform: state
entity_id:
- group.entry_points
- platform: state
entity_id: group.all_covers
condition:
condition: and
conditions:
- condition: state
entity_id: sun.sun
state: 'below_horizon'
- condition: state
entity_id: group.bed
state: 'off'
action:
- service: light.turn_on
entity_id:
- group.living_room_accents
data_template:
color_name: >
{% if states.group.entry_points.state == 'on' or states.group.all_covers.state != 'closed' -%}
red
{% else %}
gold
{% endif %}
#-------------------------------------------#---
- alias: "Panel Door opened"
hide_entity: True

View File

@ -32,14 +32,14 @@ sensor:
duration:
hours: 24
- platform: history_stats
name: HVAC Time
entity_id: sensor.downstairs_thermostat_hvac_state
state: 'on'
type: time
end: '{{ now() }}'
duration:
hours: 24
# - platform: history_stats
# name: HVAC Time
# entity_id: sensor.downstairs_thermostat_hvac_state
# state: 'on'
# type: time
# end: '{{ now() }}'
# duration:
# hours: 24
- platform: history_stats
name: Landscaping Light time
@ -55,6 +55,7 @@ group:
entities:
- sensor.doorbell_presses
- sensor.landscaping_light_time
- sensor.hvac_time
#############################################################