Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- substitutions:
- device_name: awesome-presence-office
- device_name_pretty: Awesome Presence Office
- pir_delay_on: 50ms
- pir_delay_off: 500ms
- combined_presence_delay_off: 15s
- esphome:
- name: $device_name
- friendly_name: $device_name_pretty
- platformio_options:
- board_build.flash_mode: dio
- esp32:
- board: seeed_xiao_esp32c3
- variant: esp32c3
- framework:
- type: arduino
- # Enable logging
- logger:
- # Enable Home Assistant API
- api:
- encryption:
- key: !secret encryption_key
- ota:
- platform: esphome
- password: !secret ota_password
- wifi:
- ssid: !secret wifi_ssid
- password: !secret wifi_password
- esp32_ble_tracker:
- scan_parameters:
- active: true
- bluetooth_proxy:
- active: true
- esp32_improv:
- authorizer: none
- ld2410:
- id: ld2410_radar
- uart:
- tx_pin: 5
- rx_pin: 4
- baud_rate: 256000
- parity: NONE
- stop_bits: 1
- number:
- - platform: ld2410
- timeout:
- name: Radar Timeout
- max_move_distance_gate:
- name: Radar Max Move Distance
- max_still_distance_gate:
- name: Radar Max Still Distance
- g0:
- move_threshold:
- name: g0 move threshold
- still_threshold:
- name: g0 still threshold
- g1:
- move_threshold:
- name: g1 move threshold
- still_threshold:
- name: g1 still threshold
- g2:
- move_threshold:
- name: g2 move threshold
- still_threshold:
- name: g2 still threshold
- g3:
- move_threshold:
- name: g3 move threshold
- still_threshold:
- name: g3 still threshold
- g4:
- move_threshold:
- name: g4 move threshold
- still_threshold:
- name: g4 still threshold
- g5:
- move_threshold:
- name: g5 move threshold
- still_threshold:
- name: g5 still threshold
- g6:
- move_threshold:
- name: g6 move threshold
- still_threshold:
- name: g6 still threshold
- g7:
- move_threshold:
- name: g7 move threshold
- still_threshold:
- name: g7 still threshold
- g8:
- move_threshold:
- name: g8 move threshold
- still_threshold:
- name: g8 still threshold
- binary_sensor:
- - platform: ld2410
- has_target:
- name: Radar Target
- id: radar_has_target
- has_moving_target:
- name: Radar Moving Target
- has_still_target:
- name: Radar Still Target
- - platform: gpio
- name: "PIR Sensor"
- device_class: motion
- pin:
- number: 21
- mode:
- input: true
- pulldown: true
- id: pir_sensor
- filters:
- - delayed_on: $pir_delay_on
- - delayed_off: $pir_delay_off
- - platform: template
- name: "Combined Presence Sensor"
- lambda: |-
- if (id(pir_sensor).state) {
- return true;
- } else if (!id(radar_has_target).state) {
- return false;
- }
- return {};
- device_class: motion
- filters:
- - delayed_off: $combined_presence_delay_off
- sensor:
- - platform: ld2410
- moving_distance:
- name: Radar Moving Distance
- id: moving_distance
- still_distance:
- name: Radar Still Distance
- id: still_distance
- moving_energy:
- name: Radar Move Energy
- still_energy:
- name: Radar Still Energy
- detection_distance:
- name: Radar Detection Distance
- id: radar_detection_distance
- g0:
- move_energy:
- name: g0 move energy
- still_energy:
- name: g0 still energy
- g1:
- move_energy:
- name: g1 move energy
- still_energy:
- name: g1 still energy
- g2:
- move_energy:
- name: g2 move energy
- still_energy:
- name: g2 still energy
- g3:
- move_energy:
- name: g3 move energy
- still_energy:
- name: g3 still energy
- g4:
- move_energy:
- name: g4 move energy
- still_energy:
- name: g4 still energy
- g5:
- move_energy:
- name: g5 move energy
- still_energy:
- name: g5 still energy
- g6:
- move_energy:
- name: g6 move energy
- still_energy:
- name: g6 still energy
- g7:
- move_energy:
- name: g7 move energy
- still_energy:
- name: g7 still energy
- g8:
- move_energy:
- name: g8 move energy
- still_energy:
- name: g8 still energy
- switch:
- - platform: ld2410
- engineering_mode:
- name: "engineering mode"
- bluetooth:
- name: "control bluetooth"
- button:
- - platform: restart
- name: "Restart ESPHome Device"
Advertisement
Add Comment
Please, Sign In to add comment