2024年11月24日星期日 上午1:10:54

automation turn on light on book bedroom

2 年 前
#18848 引用
automation turn on light on book bedroom

Use Case 1 – Setting up one Motion Sensor in Home Assistant

One motion sensor controls one lamp in one room.

The lamp turns on when motion is detected. When no movement is detected for 5 minutes then turn off the lamp.
0
2 年 前
#18849 引用
Part 1: turn on light when  motion  mijia motion sensor 2 on book bedrom


Step 1: turn on light when  motion  mijia motion sensor 2 on book bedrom




- id: '1669189650419'
  alias: A - book bedroom mijia motion sensor 2 motion open ylink.light.ceiling26
  description: ''
  trigger:
  - platform: state
    entity_id:
    - sensor.lumi_bmgl01_8283_trigger_at
  condition: []
  action:
  - service: light.turn_on
    data: {}
    target:
      entity_id: light.yeelight_ceil26_0x1c5c4959
  mode: single
- id: '1669191423854'
  alias: A - turn off Ylink.light.ceiling26 when mijia no motion sensor 2 on book
    bedroom20221122
  description: ''
  trigger:
  - platform: state
    entity_id:
    - sensor.lumi_bmgl01_8283_trigger_at
    for:
      hours: 0
      minutes: 0
      seconds: 59
  condition: []
  action:
  - service: light.turn_off
    data: {}
    target:
      entity_id: light.yeelight_ceil26_0x1c5c4959
  mode: single


0
1 年 前
#18859 引用
1

0
1 年 前
#20272 引用
The problem
0
1 年 前
#20273 引用
s
0
1 年 前
#20274 引用
Part 2: turn on light when  motion  mijia motion sensor 2 on book bedrom

add sunset



alias: A - book bedroom mijia motion sensor 2 motion open ylink.light.ceiling26
description: https://www.msly.cn/boards/topic/14409/
trigger:
  - platform: state
    entity_id:
      - sensor.lumi_bmgl01_8283_trigger_at
condition:
  - condition: sun
    after: sunset
    before: sunrise
action:
  - service: light.turn_on
    data: {}
    target:
      entity_id: light.yeelight_ceil26_0x1c5c4959
mode: single




0
1 年 前
#20275 引用
The problem

run slower
0
1 年 前
#20276 引用
s
0
1 年 前
#20277 引用
Part 3: turn on light when  motion  mijia motion sensor 2 on book bedrom



trigger:

state
    sensor.lumi_bmgl01_8283_trigger_at

condition:
  - condition: state
    entity_id: input_boolean.input_boolean_husband
    state: "on"

action:



0
7 个月 前
#30856 引用
20230325 multi motion sensor   run ok

http://192.168.2.50:8123/config/automation/edit/1694039063484



alias: >-
  Book Room | A - turn off/on  input  only when  no motion Aqara Motion Sensor
  CN Version (RTCGQ11LM) no3 by homekit contreller  in  Bedroom
description: ""
trigger:
  - platform: state
    entity_id:
      - binary_sensor.motion_sensor_4
      - binary_sensor.aqara_motion_sensor_e1_cn_version_rtcgq15lm_no1_7
      - binary_sensor.aqara_motion_sensor_p1_cn_version_rtcgq14lm_3
condition:
  - condition: state
    entity_id: input_boolean.input_boolean_dark
    state: "on"
action:
  - service: input_boolean.turn_on
    data: {}
    target:
      entity_id: input_boolean.input_boolean_husband
  - service: light.turn_on
    data: {}
    target:
      entity_id: light.yeelight_ceil26_0x1c5c4959
  - service: light.turn_on
    data: {}
    target:
      entity_id: light.yeelink_ceil26_ef4f_light
  - delay:
      hours: 0
      minutes: 1
      seconds: 0
      milliseconds: 0
  - service: input_boolean.turn_off
    data: {}
    target:
      entity_id: input_boolean.input_boolean_husband
  - service: light.turn_off
    data: {}
    target:
      entity_id: light.yeelight_ceil26_0x1c5c4959
mode: restart


0