From 6293c7a50b9f1137899321e63dea3fb4751375d3 Mon Sep 17 00:00:00 2001 From: CCOSTAN Date: Tue, 18 Oct 2016 00:52:04 +0000 Subject: [PATCH] Add a Guest mode to the House! Boom! --- automation/good_night.yaml | 10 +++++++--- automation/tv_time.yaml | 4 ++++ automation/tv_time_off.yaml | 6 +++++- configuration.yaml | 1 + customize/homeassistant.yaml | 6 +++++- input_boolean/guest.yaml | 7 +++++++ 6 files changed, 29 insertions(+), 5 deletions(-) create mode 100755 input_boolean/guest.yaml diff --git a/automation/good_night.yaml b/automation/good_night.yaml index 09e387a7..3b0ad427 100755 --- a/automation/good_night.yaml +++ b/automation/good_night.yaml @@ -15,9 +15,13 @@ state: not_home condition: - condition: state - entity_id: group.family - state: not_home + - condition: state + entity_id: group.family + state: not_home + - condition: + platform: state + entity_id: input_boolean.guest_mode + state: 'off' action: - service: light.turn_off diff --git a/automation/tv_time.yaml b/automation/tv_time.yaml index 00d381f8..6ade27d5 100755 --- a/automation/tv_time.yaml +++ b/automation/tv_time.yaml @@ -21,6 +21,10 @@ - condition: state entity_id: sun.sun state: 'below_horizon' + - condition: + platform: state + entity_id: input_boolean.guest_mode + state: 'off' action: service: scene.turn_on diff --git a/automation/tv_time_off.yaml b/automation/tv_time_off.yaml index e5d85b7d..8da49de0 100755 --- a/automation/tv_time_off.yaml +++ b/automation/tv_time_off.yaml @@ -10,7 +10,11 @@ - condition: state entity_id: sun.sun state: 'below_horizon' - + - condition: + platform: state + entity_id: input_boolean.guest_mode + state: 'off' + action: service: light.turn_off entity_id: diff --git a/configuration.yaml b/configuration.yaml index c4678a6a..f0269195 100755 --- a/configuration.yaml +++ b/configuration.yaml @@ -13,6 +13,7 @@ http: frontend: group: !include_dir_merge_named group device_tracker: !include_dir_merge_list device_tracker +input_boolean: !include_dir_merge_named input_boolean discovery: updater: sun: diff --git a/customize/homeassistant.yaml b/customize/homeassistant.yaml index 507f00a8..c14f09d7 100755 --- a/customize/homeassistant.yaml +++ b/customize/homeassistant.yaml @@ -6,4 +6,8 @@ sensor.since_last_boot: hidden: true sensor.badlogin: - hidden: true \ No newline at end of file + hidden: true + +input_boolean.guest_mode: + friendly_name: 'Guest Mode' + icon: mdi:account-alert \ No newline at end of file diff --git a/input_boolean/guest.yaml b/input_boolean/guest.yaml new file mode 100755 index 00000000..434593f3 --- /dev/null +++ b/input_boolean/guest.yaml @@ -0,0 +1,7 @@ +################################### +## Guest Mode Override +################################### +guest_mode: + icon: mdi:account-alert + initial: off + \ No newline at end of file