Browse Source

Fixed motion detection

master
Teknikode 6 months ago
parent
commit
85d0e53787
2 changed files with 12 additions and 12 deletions
  1. 4
    4
      automations/light_motion_detection.yaml
  2. 8
    8
      sensors.yaml

+ 4
- 4
automations/light_motion_detection.yaml View File

@@ -8,7 +8,7 @@
condition: and
conditions:
- condition: template
value_template: '{{ states.sensor.kitchen_light_level.state|float < 10.0 }}'
value_template: '{{ states.binary_sensor.kitchen_light_level.state|float < 10.0 }}'
- condition: state
entity_id: input_boolean.in_bed
state: 'off'
@@ -40,7 +40,7 @@
condition: and
conditions:
- condition: template
value_template: '{{ states.sensor.hallway_light_level.state|float < 10.0 }}'
value_template: '{{ states.binary_sensor.hallway_light_level.state|float < 10.0 }}'
- condition: state
entity_id: input_boolean.in_bed
state: 'off'
@@ -72,7 +72,7 @@
condition: and
conditions:
- condition: template
value_template: '{{ states.sensor.upper_hallway_light_level.state|float < 10.0 }}'
value_template: '{{ states.binary_sensor.upper_hallway_light_level.state|float < 10.0 }}'
- condition: state
entity_id: input_boolean.in_bed
state: 'off'
@@ -104,7 +104,7 @@
condition: and
conditions:
- condition: template
value_template: '{{ states.sensor.bedroom_light_level.state|float < 10.0 }}'
value_template: '{{ states.binary_sensor.bedroom_light_level.state|float < 10.0 }}'
- condition: state
entity_id: input_boolean.in_bed
state: 'off'

+ 8
- 8
sensors.yaml View File

@@ -9,42 +9,42 @@

upper_hallway_temp:
friendly_name: 'Upper hallway temp'
value_template: '{{states.sensor.upper_motion_hallway.attributes.temperature|float}}'
value_template: '{{states.binary_sensor.upper_motion_hallway.attributes.temperature|float}}'
unit_of_measurement: °C

upper_hallway_light_level:
friendly_name: 'Upper hallway light level'
value_template: '{{states.sensor.upper_motion_hallway.attributes.lx}}'
value_template: '{{states.binary_sensor.upper_motion_hallway.attributes.lx}}'
unit_of_measurement: lux
bedroom_temp:
friendly_name: 'Bedroom temp'
value_template: '{{states.sensor.motion_bedroom.attributes.temperature}}'
value_template: '{{states.binary_sensor.motion_bedroom.attributes.temperature}}'
unit_of_measurement: °C

bedroom_light_level:
friendly_name: 'Bedroom light level'
value_template: '{{states.sensor.motion_bedroom.attributes.lx}}'
value_template: '{{states.binary_sensor.motion_bedroom.attributes.lx}}'
unit_of_measurement: lux
kitchen_temp:
friendly_name: 'Kitchen temp'
value_template: '{{states.sensor.motion_kitchen.attributes.temperature}}'
value_template: '{{states.binary_sensor.motion_kitchen.attributes.temperature}}'
unit_of_measurement: °C

kitchen_light_level:
friendly_name: 'Kitchen light level'
value_template: '{{states.sensor.motion_kitchen.attributes.lx}}'
value_template: '{{states.binary_sensor.motion_kitchen.attributes.lx}}'
unit_of_measurement: lux
hallway_temp:
friendly_name: 'Hallway temp'
value_template: '{{states.sensor.motion_hallway.attributes.temperature}}'
value_template: '{{states.binary_sensor.motion_hallway.attributes.temperature}}'
unit_of_measurement: °C

hallway_light_level:
friendly_name: 'Hallway light level'
value_template: '{{states.sensor.motion_hallway.attributes.lx}}'
value_template: '{{states.binary_sensor.motion_hallway.attributes.lx}}'
unit_of_measurement: lux

Loading…
Cancel
Save