-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
esp8266-example.yaml
149 lines (135 loc) · 3.61 KB
/
esp8266-example.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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
substitutions:
name: apc-ups
device_description: "Monitor and control a APC UPS via RS232"
external_components_source: github://syssi/esphome-apc-ups@main
tx_pin: GPIO4
rx_pin: GPIO5
esphome:
name: ${name}
comment: ${device_description}
min_version: 2024.6.0
project:
name: "syssi.esphome-apc-ups"
version: 1.0.0
esp8266:
board: d1_mini
external_components:
- source: ${external_components_source}
refresh: 0s
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
ota:
platform: esphome
logger:
# If you don't use Home Assistant please remove this `api` section and uncomment the `mqtt` component!
api:
# mqtt:
# broker: !secret mqtt_host
# username: !secret mqtt_username
# password: !secret mqtt_password
# id: mqtt_client
uart:
- id: uart_0
baud_rate: 2400
tx_pin: ${tx_pin}
rx_pin: ${rx_pin}
debug:
direction: BOTH
dummy_receiver: false
after:
delimiter: "\n"
sequence:
- lambda: UARTDebug::log_string(direction, bytes);
apc_ups:
- id: ups0
uart_id: uart_0
binary_sensor:
- platform: apc_ups
apc_ups_id: ups0
runtime_calibration:
name: "${name} runtime calibration"
smart_trim:
name: "${name} smart trim"
smart_boost:
name: "${name} smart boost"
on_line:
name: "${name} on line"
on_battery:
name: "${name} on battery"
output_overloaded:
name: "${name} output overloaded"
battery_low:
name: "${name} battery low"
replace_battery:
name: "${name} replace battery"
smart_mode:
name: "${name} smart mode"
switch:
- platform: apc_ups
apc_ups_id: ups0
front_panel_test:
name: "${name} front panel test"
simulate_power_failure:
name: "${name} simulate power failure"
self_test:
name: "${name} self test"
start_runtime_calibration:
name: "${name} start runtime calibration"
sensor:
- platform: apc_ups
apc_ups_id: ups0
battery_voltage:
name: "${name} battery voltage"
grid_frequency:
name: "${name} grid frequency"
grid_voltage:
name: "${name} grid voltage"
ac_output_voltage:
name: "${name} ac output voltage"
ac_output_load:
name: "${name} ac output load"
status_bitmask:
name: "${name} status bitmask"
state_of_charge:
name: "${name} state of charge"
estimated_runtime:
name: "${name} estimated runtime"
internal_temperature:
name: "${name} internal temperature"
ambient_temperature:
name: "${name} ambient temperature"
max_grid_voltage:
name: "${name} max grid voltage"
min_grid_voltage:
name: "${name} min grid voltage"
nominal_battery_voltage:
name: "${name} nominal battery voltage"
nominal_output_voltage:
name: "${name} nominal output voltage"
text_sensor:
- platform: apc_ups
apc_ups_id: ups0
cause_of_last_transfer:
name: "${name} cause of last transfer"
# Could cause a connection reset of the Home Assistant API connection
# See https://github.com/syssi/esphome-apc-ups/issues/1
#
# protocol_info:
# name: "${name} protocol info"
firmware_revision:
name: "${name} firmware revision"
old_firmware_version:
name: "${name} old firmware version"
manufacture_date:
name: "${name} manufacture date"
last_battery_change_date:
name: "${name} last battery change date"
local_identifier:
name: "${name} local identifier"
serial_number:
name: "${name} serial number"
self_test_results:
name: "${name} self test results"
model_name:
name: "${name} model name"