-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtds.yaml
88 lines (75 loc) · 1.76 KB
/
tds.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
80
81
82
83
84
85
86
87
88
esphome:
name: tds
friendly_name: tds
includes:
- custom_tds.h
esp8266:
board: d1_mini
restore_from_flash: true
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: !secret api_key
reboot_timeout: !secret api_reboot_timeout
ota:
password: !secret ota_password
web_server:
port: 80
wifi:
networks:
- ssid: !secret wifi_ssid
password: !secret wifi_password
- ssid: !secret wifi_rcm_ssid
password: !secret wifi_rcm_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "${device_name}"
password: "12345678"
captive_portal:
uart:
id: uart_bus
tx_pin: D4
rx_pin: D3
baud_rate: 9600
debug:
sensor:
- platform : custom
lambda: |-
auto my_sensor = new MyTDSSensor(id(uart_bus));
App.register_component(my_sensor);
return {my_sensor->input_tds_sensor,my_sensor->input_temp_sensor,my_sensor->output_tds_sensor,my_sensor->output_temp_sensor};
sensors:
- name: "Input Water TDS Sensor"
icon: "mdi:cup-water"
- name: "Input Water Temperature Sensor"
unit_of_measurement: "°C"
icon: "mdi:thermometer-water"
device_class: "temperature"
state_class: "measurement"
accuracy_decimals: 2
- name: "Output Water TDS Sensor"
icon: "mdi:cup-water"
- name: "Output Water Temperature Sensor"
unit_of_measurement: °C
icon: "mdi:thermometer-water"
device_class: "temperature"
state_class: "measurement"
accuracy_decimals: 2
#status_led:
# pin: D4
button:
- platform: restart
id: "restartButton"
name: "System Restart"
time:
- platform: sntp
id: my_time
timezone: Asia/Shanghai
on_time:
- seconds: 0
minutes: 0
hours: 2
then:
- button.press: restartButton