From 88d2e934fd7095928ca17106d80105309e21b1e3 Mon Sep 17 00:00:00 2001 From: Uncled1023 Date: Thu, 21 Mar 2019 23:54:37 -0700 Subject: [PATCH] Added binary sensor --- automations/light_motion_detection.yaml | 16 ++++++++-------- binary_sensors.yaml | 1 + configuration.yaml | 1 + groups.yaml | 8 ++++---- 4 files changed, 14 insertions(+), 12 deletions(-) create mode 100644 binary_sensors.yaml diff --git a/automations/light_motion_detection.yaml b/automations/light_motion_detection.yaml index aa10825..71621dd 100644 --- a/automations/light_motion_detection.yaml +++ b/automations/light_motion_detection.yaml @@ -1,7 +1,7 @@ - alias: Turn on kitchen light when there is movement trigger: platform: state - entity_id: sensor.motion_kitchen + entity_id: binary_sensor.motion_kitchen to: 'on' condition: @@ -20,7 +20,7 @@ - alias: Turn off kitchen light 30 seconds after last movement trigger: platform: state - entity_id: sensor.motion_kitchen + entity_id: binary_sensor.motion_kitchen to: 'off' from: 'on' for: @@ -33,7 +33,7 @@ - alias: Turn on hallway light when there is movement trigger: platform: state - entity_id: sensor.motion_hallway + entity_id: binary_sensor.motion_hallway to: 'on' condition: @@ -52,7 +52,7 @@ - alias: Turn off hallway light 10 seconds after last movement trigger: platform: state - entity_id: sensor.motion_hallway + entity_id: binary_sensor.motion_hallway to: 'off' from: 'on' for: @@ -65,7 +65,7 @@ - alias: Turn on hallway light when there is movement in upper trigger: platform: state - entity_id: sensor.upper_motion_hallway + entity_id: binary_sensor.upper_motion_hallway to: 'on' condition: @@ -84,7 +84,7 @@ - alias: Turn off hallway light 10 seconds after last movement in upper trigger: platform: state - entity_id: sensor.upper_motion_hallway + entity_id: binary_sensor.upper_motion_hallway to: 'off' from: 'on' for: @@ -97,7 +97,7 @@ - alias: Turn on bedroom lights when there is movement trigger: platform: state - entity_id: sensor.motion_bedroom + entity_id: binary_sensor.motion_bedroom to: 'on' condition: @@ -116,7 +116,7 @@ - alias: Turn off bedroom light 30 seconds after last movement trigger: platform: state - entity_id: sensor.motion_bedroom + entity_id: binary_sensor.motion_bedroom to: 'off' from: 'on' for: diff --git a/binary_sensors.yaml b/binary_sensors.yaml new file mode 100644 index 0000000..5b5c1e6 --- /dev/null +++ b/binary_sensors.yaml @@ -0,0 +1 @@ +- platform: huesensor \ No newline at end of file diff --git a/configuration.yaml b/configuration.yaml index 0d96249..6acb452 100644 --- a/configuration.yaml +++ b/configuration.yaml @@ -117,6 +117,7 @@ zone: switch: !include switches.yaml sensor: !include sensors.yaml +binary_sensor: !include binary_sensors.yaml group: !include groups.yaml automation: !include_dir_merge_list automations script: !include_dir_merge_named scripts diff --git a/groups.yaml b/groups.yaml index 19c3268..b442486 100644 --- a/groups.yaml +++ b/groups.yaml @@ -80,7 +80,7 @@ bedroom: - light.hue_white_lamp_5 - light.hue_white_lamp_8 - switch.bedroom_ceiling_light - - sensor.motion_bedroom + - binary_sensor.motion_bedroom - sensor.bedroom_temp - sensor.bedroom_light_level kitchen: @@ -88,7 +88,7 @@ kitchen: name: Kitchen entities: - switch.kitchen_lights - - sensor.motion_kitchen + - binary_sensor.motion_kitchen - sensor.kitchen_temp - sensor.kitchen_light_level entry_way: @@ -102,10 +102,10 @@ hallway: name: Hallway entities: - switch.hallway_light - - sensor.motion_hallway + - binary_sensor.motion_hallway - sensor.hallway_temp - sensor.hallway_light_level - - sensor.upper_motion_hallway + - binary_sensor.upper_motion_hallway - sensor.upper_hallway_temp - sensor.upper_hallway_light_level lights: