Browse Source

Added binary sensor

master
Teknikode 6 months ago
parent
commit
88d2e934fd
4 changed files with 14 additions and 12 deletions
  1. 8
    8
      automations/light_motion_detection.yaml
  2. 1
    0
      binary_sensors.yaml
  3. 1
    0
      configuration.yaml
  4. 4
    4
      groups.yaml

+ 8
- 8
automations/light_motion_detection.yaml View File

@@ -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:

+ 1
- 0
binary_sensors.yaml View File

@@ -0,0 +1 @@
- platform: huesensor

+ 1
- 0
configuration.yaml View File

@@ -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

+ 4
- 4
groups.yaml View File

@@ -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:

Loading…
Cancel
Save