-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathesphome.yaml
79 lines (67 loc) · 1.77 KB
/
esphome.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
substitutions:
devicename: geiger
upper_devicename: Geiger Counter
esphome:
name: $devicename
platform: ESP32
board: nodemcu-32s
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
ap:
ssid: ${upper_devicename} Fallback Hotspot
password: !secret fallback_password
captive_portal:
# Optional manual IP
# manual_ip:
# static_ip: 192.168.0.195
# gateway: 192.168.0.1
# subnet: 255.255.255.0
# Enable logging
logger:
# Enable Home Assistant API
api:
password: !secret api_password
ota:
password: !secret ota_password
switch:
- platform: restart
name: ${upper_devicename} Restart
text_sensor:
- platform: wifi_info
ip_address:
name: ${upper_devicename} IP Address
ssid:
name: ${upper_devicename} Connected SSID
bssid:
name: ${upper_devicename} Connected BSSID
sensor:
- platform: pulse_counter
pin: GPIO36
name: ${upper_devicename}
id: "geiger_counter"
unit_of_measurement: 'CPM'
on_raw_value:
- sensor.template.publish:
id: radiation_level
state: !lambda 'return x / 153.8;'
# this was what I got for my data sheet and it matched reasonably well with the background data that I have. Many people are using other values.
- platform: template
name: "Radiation Level"
id: "radiation_level"
unit_of_measurement: 'µSv/h'
icon: mdi:radioactive
accuracy_decimals: 5
binary_sensor:
- platform: template
device_class: safety
name: "Radiation Warning"
# This doesn't necessarily represent a "dangerous" count, but one that is abnormally high
lambda: |-
if (id(geiger_counter).state > 100) {
// High Count.
return true;
} else {
// Normal Count.
return false;
}