167 lines
3.6 KiB
Django/Jinja
167 lines
3.6 KiB
Django/Jinja
esphome:
|
|
name: screek-human-dectet-1u
|
|
comment: Screek Human Presence Sensor 24GHz PS-HPS 1U
|
|
friendly_name: Screek Human Presence Sensor 1U
|
|
name_add_mac_suffix: true
|
|
platformio_options:
|
|
board_build.flash_mode: dio
|
|
board_build.extra_flags:
|
|
- "-DARDUINO_USB_CDC_ON_BOOT=0"
|
|
project:
|
|
name: Screek.Human_Presence_Sensor
|
|
version: 1U
|
|
|
|
|
|
external_components:
|
|
# - source: github://screek-workshop/custom_components_support_for_screek_1u
|
|
- source:
|
|
type: git
|
|
url: https://github.com/screek-workshop/custom_components_support_for_screek_1u
|
|
ref: master
|
|
# components: [ ld2410, uart ]
|
|
|
|
|
|
esp32:
|
|
board: lolin_s2_mini
|
|
framework:
|
|
type: arduino
|
|
version: 2.0.7
|
|
platform_version: 6.0.1
|
|
|
|
improv_serial:
|
|
|
|
logger:
|
|
# hardware_uart: uart0
|
|
|
|
api:
|
|
password: "{{ hass_esphome_api_password }}"
|
|
|
|
ota:
|
|
password: "{{ hass_esphome_ota_password }}"
|
|
|
|
mdns:
|
|
disabled: true
|
|
|
|
wifi:
|
|
ssid: "{{ hass_esphome_wifi_ssid }}"
|
|
password: "{{ hass_esphome_wifi_password }}"
|
|
|
|
domain: .{{ inventory_hostname.split('.')[1:] | join('.') }}
|
|
|
|
power_save_mode: NONE
|
|
ap:
|
|
ssid: "SCREEK HUMAN-SENSOR"
|
|
password: "{{ hass_esphome_fallback_wifi_password }}"
|
|
|
|
captive_portal:
|
|
|
|
web_server:
|
|
port: 80
|
|
|
|
binary_sensor:
|
|
- platform: status
|
|
name: Online
|
|
id: ink_ha_connected
|
|
- platform: ld2410
|
|
has_target:
|
|
name: Presence
|
|
has_moving_target:
|
|
name: Moving Target
|
|
has_still_target:
|
|
name: Still Target
|
|
|
|
sensor:
|
|
- platform: template
|
|
id: sys_esp_temperature
|
|
name: ESP Temperature
|
|
lambda: return temperatureRead();
|
|
unit_of_measurement: °C
|
|
device_class: TEMPERATURE
|
|
update_interval: 30s
|
|
entity_category: "diagnostic"
|
|
- platform: uptime
|
|
name: Uptime
|
|
id: sys_uptime
|
|
update_interval: 10s
|
|
- platform: wifi_signal
|
|
name: RSSI
|
|
id: wifi_signal_db
|
|
update_interval: 1s
|
|
entity_category: "diagnostic"
|
|
- platform: template
|
|
id: esp_memory
|
|
icon: mdi:memory
|
|
name: ESP Free Memory
|
|
lambda: return heap_caps_get_free_size(MALLOC_CAP_INTERNAL) / 1024;
|
|
unit_of_measurement: 'kB'
|
|
state_class: measurement
|
|
entity_category: "diagnostic"
|
|
- platform: ld2410
|
|
moving_distance:
|
|
name : Moving Distance
|
|
id: moving_distance
|
|
still_distance:
|
|
name: Still Distance
|
|
id: still_distance
|
|
moving_energy:
|
|
name: Move Energy
|
|
device_class: power_factor
|
|
still_energy:
|
|
name: Still Energy
|
|
device_class: power_factor
|
|
detection_distance:
|
|
name: Detection Distance
|
|
light:
|
|
name: Sun Light
|
|
|
|
light:
|
|
- platform: status_led
|
|
name: sys_status
|
|
pin: GPIO15
|
|
internal: True
|
|
restore_mode: ALWAYS_OFF
|
|
|
|
uart:
|
|
id: uart1
|
|
tx_pin: GPIO18
|
|
rx_pin: GPIO33
|
|
baud_rate: 256000
|
|
parity: NONE
|
|
stop_bits: 1
|
|
|
|
ld2410:
|
|
timeout: 150s
|
|
id: ld2410_radar
|
|
|
|
button:
|
|
- platform: template
|
|
name: "Enable LD2410 BLE"
|
|
entity_category: "config"
|
|
icon: mdi:bluetooth
|
|
on_press:
|
|
lambda: |-
|
|
id(ld2410_radar) -> ble_control(true);
|
|
- platform: template
|
|
name: "Disable LD2410 BLE"
|
|
entity_category: "config"
|
|
icon: mdi:bluetooth-off
|
|
on_press:
|
|
lambda: |-
|
|
id(ld2410_radar) -> ble_control(false);
|
|
- platform: template
|
|
name: "LD2410 Reboot"
|
|
icon: mdi:radar
|
|
entity_category: "config"
|
|
on_press:
|
|
lambda: |-
|
|
// auto* radar = LD2410Component::get(ld2410);
|
|
// radar -> roboot();
|
|
id(ld2410_radar) -> reboot();
|
|
- platform: restart
|
|
icon: mdi:power-cycle
|
|
name: "ESP Reboot"
|
|
# - platform: factory_reset
|
|
# disabled_by_default: true
|
|
# name: Factory Reset
|
|
# id: factory_reset_all
|