periodic push
This commit is contained in:
36
esphome/sensors/battery.yaml
Executable file
36
esphome/sensors/battery.yaml
Executable file
@@ -0,0 +1,36 @@
|
||||
---
|
||||
sensor:
|
||||
# Batterie volt
|
||||
- platform: adc
|
||||
pin: ${pin_vbatt}
|
||||
name: '${device_name} Battery Voltage'
|
||||
id: '${device_name}_voltage'
|
||||
attenuation: 11db
|
||||
unit_of_measurement: 'V'
|
||||
icon: 'mdi:battery-high'
|
||||
device_class: 'voltage'
|
||||
state_class: 'measurement'
|
||||
accuracy_decimals: 2
|
||||
filters:
|
||||
- multiply: 2
|
||||
- calibrate_linear:
|
||||
# Map 0.0 (from sensor) to 0.0 (true value)
|
||||
- 0.0 -> 0.0
|
||||
- 4.0 -> 4.0
|
||||
update_interval: ${update_interval}
|
||||
|
||||
# Battery %
|
||||
- platform: adc
|
||||
pin: ${pin_vbatt}
|
||||
name: '${device_name} Battery'
|
||||
id: '${device_name}_percent'
|
||||
attenuation: 11db
|
||||
accuracy_decimals: 2
|
||||
unit_of_measurement: '%'
|
||||
filters:
|
||||
- multiply: 2
|
||||
- calibrate_linear:
|
||||
# Map 0.0 (from sensor) to 0.0 (true value)
|
||||
- 3.18 -> 0.0
|
||||
- 4.20 -> 100.0
|
||||
update_interval: ${update_interval}
|
||||
20
esphome/sensors/bme280.yaml
Executable file
20
esphome/sensors/bme280.yaml
Executable file
@@ -0,0 +1,20 @@
|
||||
---
|
||||
sensor:
|
||||
- platform: bme280
|
||||
i2c_id: bus_a
|
||||
temperature:
|
||||
name: '${device_name} BME280 Temperature'
|
||||
oversampling: 1x
|
||||
# filters: # uncomment after calibration
|
||||
# - offset: -2.3 # offset in °C for the measured temperature
|
||||
pressure:
|
||||
name: '${device_name} BME280 Pressure'
|
||||
# filters: # uncomment after calibration
|
||||
# - offset: -2.3 # offset in °C for the measured temperature
|
||||
humidity:
|
||||
name: '${device_name} BME280 Humidity'
|
||||
# filters: # uncomment after calibration
|
||||
# - offset: -2.3 # offset in °C for the measured temperature
|
||||
address: 0x77
|
||||
update_interval: ${update_interval}
|
||||
setup_priority: -300
|
||||
26
esphome/sensors/dht.yaml
Executable file
26
esphome/sensors/dht.yaml
Executable file
@@ -0,0 +1,26 @@
|
||||
---
|
||||
sensor:
|
||||
# DHT
|
||||
- platform: dht
|
||||
pin: 16
|
||||
model: dht11
|
||||
temperature:
|
||||
name: '${device_name} DHT Temperature'
|
||||
unit_of_measurement: '°C'
|
||||
icon: 'mdi:thermometer'
|
||||
device_class: 'temperature'
|
||||
state_class: 'measurement'
|
||||
accuracy_decimals: 1
|
||||
# filters: # uncomment after calibration
|
||||
# - offset: -2.3 # offset in °C for the measured temperature
|
||||
humidity:
|
||||
name: '${device_name} DHT Humidity'
|
||||
unit_of_measurement: '%'
|
||||
icon: 'mdi:cloud-percent'
|
||||
device_class: 'humidity'
|
||||
state_class: 'measurement'
|
||||
accuracy_decimals: 1
|
||||
# filters: # uncomment after calibration
|
||||
# - offset: -2.3 # offset in °C for the measured temperature
|
||||
setup_priority: -100
|
||||
update_interval: ${update_interval}
|
||||
7
esphome/sensors/homeassistant.yaml
Executable file
7
esphome/sensors/homeassistant.yaml
Executable file
@@ -0,0 +1,7 @@
|
||||
platform: homeassistant
|
||||
entity_id: ${entity_id}
|
||||
attribute: ${id}
|
||||
id: ${id}
|
||||
on_value:
|
||||
then:
|
||||
- lambda: 'id(data_updated) = true;'
|
||||
50
esphome/sensors/ld2410.yaml
Executable file
50
esphome/sensors/ld2410.yaml
Executable file
@@ -0,0 +1,50 @@
|
||||
|
||||
uart:
|
||||
- !include ../interfaces/uart_ld.yaml
|
||||
|
||||
# Example configuration entry
|
||||
ld2410:
|
||||
uart_id: uart_ld
|
||||
timeout: 1s
|
||||
max_move_distance : 6m
|
||||
max_still_distance: 3m
|
||||
# g0_move_threshold: 10
|
||||
# g0_still_threshold: 20
|
||||
# g1_move_threshold: 10
|
||||
# g1_still_threshold: 20
|
||||
# g2_move_threshold: 20
|
||||
# g2_still_threshold: 21
|
||||
# g3_move_threshold: 30
|
||||
# g3_still_threshold: 31
|
||||
# g4_move_threshold: 40
|
||||
# g4_still_threshold: 41
|
||||
# g5_move_threshold: 50
|
||||
# g5_still_threshold: 51
|
||||
# g6_move_threshold: 60
|
||||
# g6_still_threshold: 61
|
||||
# g7_move_threshold: 70
|
||||
# g7_still_threshold: 71
|
||||
# g8_move_threshold: 80
|
||||
# g8_still_threshold: 81
|
||||
|
||||
sensor:
|
||||
- platform: ld2410
|
||||
moving_distance:
|
||||
name : ${device_name} Moving Distance
|
||||
still_distance:
|
||||
name: ${device_name} Still Distance
|
||||
moving_energy:
|
||||
name: ${device_name} Move Energy
|
||||
still_energy:
|
||||
name: ${device_name} Still Energy
|
||||
detection_distance:
|
||||
name: ${device_name} Detection Distance
|
||||
|
||||
binary_sensor:
|
||||
- platform: ld2410
|
||||
has_target:
|
||||
name: ${device_name} Presence
|
||||
has_moving_target:
|
||||
name: ${device_name} Moving Target
|
||||
has_still_target:
|
||||
name: ${device_name} Still Target
|
||||
58
esphome/sensors/ld2420.yaml
Executable file
58
esphome/sensors/ld2420.yaml
Executable file
@@ -0,0 +1,58 @@
|
||||
|
||||
uart:
|
||||
- !include ../interfaces/uart_ld2420.yaml
|
||||
|
||||
external_components:
|
||||
- source: github://pr#4847
|
||||
components: [ ld2420 ]
|
||||
refresh: 0s
|
||||
|
||||
# Example configuration entry
|
||||
ld2420:
|
||||
uart_id: uart_ld
|
||||
presence_time_window: 120s
|
||||
detection_gate_min: 1
|
||||
detection_gate_max: 12
|
||||
g0_move_threshold: 60000
|
||||
g0_still_threshold: 40000
|
||||
g1_move_threshold: 30000
|
||||
g1_still_threshold: 20000
|
||||
g2_move_threshold: 400
|
||||
g2_still_threshold: 200
|
||||
g3_move_threshold: 250
|
||||
g3_still_threshold: 200
|
||||
g4_move_threshold: 250
|
||||
g4_still_threshold: 200
|
||||
g5_move_threshold: 250
|
||||
g5_still_threshold: 200
|
||||
g6_move_threshold: 250
|
||||
g6_still_threshold: 200
|
||||
g7_move_threshold: 250
|
||||
g7_still_threshold: 150
|
||||
g8_move_threshold: 250
|
||||
g8_still_threshold: 150
|
||||
g9_move_threshold: 250
|
||||
g9_still_threshold: 100
|
||||
g10_move_threshold: 250
|
||||
g10_still_threshold: 100
|
||||
g11_move_threshold: 250
|
||||
g11_still_threshold: 100
|
||||
g12_move_threshold: 250
|
||||
g12_still_threshold: 100
|
||||
g13_move_threshold: 200
|
||||
g13_still_threshold: 100
|
||||
g14_move_threshold: 200
|
||||
g14_still_threshold: 100
|
||||
g15_move_threshold: 200
|
||||
g15_still_threshold: 100
|
||||
|
||||
sensor:
|
||||
- platform: ld2420
|
||||
moving_distance:
|
||||
name : ${device_name} Moving Distance
|
||||
|
||||
|
||||
binary_sensor:
|
||||
- platform: ld2420
|
||||
has_target:
|
||||
name: ${device_name} Presence
|
||||
6
esphome/sensors/pir_raw.yaml
Executable file
6
esphome/sensors/pir_raw.yaml
Executable file
@@ -0,0 +1,6 @@
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
name: "PIR_raw"
|
||||
pin: ${pin_pir}
|
||||
icon: mdi:motion-sensor
|
||||
device_class: motion
|
||||
53
esphome/sensors/plantsensors.yaml
Executable file
53
esphome/sensors/plantsensors.yaml
Executable file
@@ -0,0 +1,53 @@
|
||||
---
|
||||
sensor:
|
||||
# Soil humidity %
|
||||
- platform: adc
|
||||
pin: ${pin_soil}
|
||||
name: '${device_name} Soil Moisture'
|
||||
id: ${device_name}_moisture
|
||||
icon: 'mdi:watering-can'
|
||||
update_interval: ${update_interval}
|
||||
attenuation: 11db
|
||||
accuracy_decimals: 2 # comment for calibration
|
||||
unit_of_measurement: '%' # comment for calibration
|
||||
device_class: 'moisture'
|
||||
state_class: 'measurement'
|
||||
# unit_of_measurement: "V" # uncomment for calibration
|
||||
filters: # comment when calibrating
|
||||
- calibrate_linear: # comment when calibrating
|
||||
# Map 0.0 (from sensor) to 0.0 (true value)
|
||||
- ${moisture_min} -> 0.0 # comment when calibrating
|
||||
- ${moisture_max} -> 100.0 # comment when calibrating
|
||||
|
||||
# Fertilizer sensor
|
||||
- platform: adc
|
||||
pin: ${pin_fertilizer}
|
||||
name: '${device_name} Soil Conductivity'
|
||||
icon: 'mdi:flower'
|
||||
update_interval: ${update_interval}
|
||||
accuracy_decimals: 2 # comment for calibration
|
||||
unit_of_measurement: 'µS/cm' # comment when calibrating
|
||||
# device_class: '' # for now home assistant does not support this class
|
||||
state_class: 'measurement'
|
||||
# unit_of_measurement: "V" # uncomment for raw data
|
||||
filters: # comment when calibrating
|
||||
- calibrate_linear: # comment when calibrating
|
||||
# Map 0.0 (from sensor) to 0.0 (true value)
|
||||
- ${conductivity_min} -> 0.0 # comment when calibrating
|
||||
- ${conductivity_max} -> 100.0 # comment when calibrating
|
||||
|
||||
# Lux sensor
|
||||
- platform: bh1750
|
||||
i2c_id: bus_a
|
||||
name: '${device_name} BH1750 Illuminance'
|
||||
address: 0x23
|
||||
unit_of_measurement: 'lx'
|
||||
icon: 'mdi:white-balance-sunny'
|
||||
device_class: 'illuminance'
|
||||
state_class: 'measurement'
|
||||
setup_priority: -300
|
||||
update_interval: ${update_interval}
|
||||
# convert to illuminance
|
||||
filters:
|
||||
- lambda: |-
|
||||
return x * 200.0;
|
||||
8
esphome/sensors/pm1006.yaml
Executable file
8
esphome/sensors/pm1006.yaml
Executable file
@@ -0,0 +1,8 @@
|
||||
uart:
|
||||
- !include ../interfaces/uart_pm.yaml
|
||||
|
||||
sensor:
|
||||
- platform: pm1006
|
||||
pm_2_5:
|
||||
name: "${location} Particulate Matter 2.5µm Concentration"
|
||||
uart_id: uart_pm
|
||||
14
esphome/sensors/pmsx0003.yaml
Executable file
14
esphome/sensors/pmsx0003.yaml
Executable file
@@ -0,0 +1,14 @@
|
||||
uart:
|
||||
- !include ../interfaces/uart_pmx.yaml
|
||||
|
||||
sensor:
|
||||
- platform: pmsx003
|
||||
uart_id: uart_pm
|
||||
type: PMSX003
|
||||
pm_1_0:
|
||||
name: ${device_name} <1.0µm
|
||||
pm_2_5:
|
||||
name: ${device_name} <2.5µm
|
||||
pm_10_0:
|
||||
name: ${device_name} <10.0µm
|
||||
update_interval: 30000ms
|
||||
14
esphome/sensors/scd30.yaml
Executable file
14
esphome/sensors/scd30.yaml
Executable file
@@ -0,0 +1,14 @@
|
||||
sensor:
|
||||
- platform: scd30
|
||||
co2:
|
||||
name: "${device_name} CO2"
|
||||
accuracy_decimals: 1
|
||||
temperature:
|
||||
name: "${device_name} Temperature"
|
||||
accuracy_decimals: 2
|
||||
humidity:
|
||||
name: "${device_name} Humidity"
|
||||
accuracy_decimals: 1
|
||||
temperature_offset: 1.5 °C
|
||||
address: 0x61
|
||||
update_interval: 5s
|
||||
11
esphome/sensors/sgp30.yaml
Executable file
11
esphome/sensors/sgp30.yaml
Executable file
@@ -0,0 +1,11 @@
|
||||
sensor:
|
||||
- platform: sgp30
|
||||
eco2:
|
||||
name: "${device_name} eCO2"
|
||||
accuracy_decimals: 1
|
||||
tvoc:
|
||||
name: "${device_name} TVOC"
|
||||
accuracy_decimals: 1
|
||||
store_baseline: yes
|
||||
address: 0x58
|
||||
update_interval: 1s
|
||||
9
esphome/sensors/sht3x.yaml
Executable file
9
esphome/sensors/sht3x.yaml
Executable file
@@ -0,0 +1,9 @@
|
||||
sensor:
|
||||
- platform: sht3xd
|
||||
temperature:
|
||||
name: Temperatuur ${device_name}
|
||||
id: sht_temp
|
||||
humidity:
|
||||
name: luchtvochtigheid ${device_name}
|
||||
address: 0x44
|
||||
update_interval: 60s
|
||||
31
esphome/sensors/tuya_mcu.yaml
Executable file
31
esphome/sensors/tuya_mcu.yaml
Executable file
@@ -0,0 +1,31 @@
|
||||
uart:
|
||||
- !include ../interfaces/uart_tuya.yaml
|
||||
|
||||
time:
|
||||
- platform: homeassistant
|
||||
id: homeassistant_time
|
||||
|
||||
tuya:
|
||||
status_pin: ${pin_tuya_status}
|
||||
time_id: homeassistant_time
|
||||
uart_id: uart_tuya
|
||||
|
||||
sensor:
|
||||
- platform: "tuya"
|
||||
name: "Temperature ${device_name}"
|
||||
id: tuya_temp
|
||||
sensor_datapoint: 101
|
||||
unit_of_measurement: "°C"
|
||||
device_class: "temperature"
|
||||
state_class: "measurement"
|
||||
filters:
|
||||
- multiply: 0.1
|
||||
accuracy_decimals: 1
|
||||
|
||||
- platform: "tuya"
|
||||
name: "humidity ${device_name}"
|
||||
sensor_datapoint: 102
|
||||
unit_of_measurement: "%rh"
|
||||
device_class: "humidity"
|
||||
state_class: "measurement"
|
||||
accuracy_decimals: 1
|
||||
0
esphome/sensors/wifi.yaml
Executable file
0
esphome/sensors/wifi.yaml
Executable file
Reference in New Issue
Block a user