-
Notifications
You must be signed in to change notification settings - Fork 2
/
blitzwolf-shp6.yaml
116 lines (102 loc) · 2.27 KB
/
blitzwolf-shp6.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
substitutions:
# Nahradte pozadovanym nazvem pro zasuvku
plug_name: blitzwolf02
# Vyssi hodnota snizuje vystupni hodnotu ve Wattech
current_res: "0.00290"
# Nizsi hodnota snizuje vystupni hodnotu ve Voltech
voltage_div: "940"
esphome:
name: ${plug_name}
platform: ESP8266
board: esp8285
wifi:
ssid: '<wifi_nazev>'
password: '<wifi_heslo>'
logger:
web_server:
port: 80
api:
ota:
binary_sensor:
- platform: gpio
id: button
pin:
number: GPIO13
inverted: True
name: "${plug_name}_button"
on_press:
- switch.toggle: fakebutton
switch:
- platform: template
id: fakebutton
name: "${plug_name}_Relay"
icon: mdi:power-socket-eu
optimistic: true
turn_on_action:
- switch.turn_on: relay
- light.turn_on: led
turn_off_action:
- switch.turn_off: relay
- light.turn_off: led
- platform: gpio
id: relay
pin: GPIO15
output:
- platform: esp8266_pwm
id: pow_blue_led
pin:
number: GPIO00
inverted: True
light:
- platform: monochromatic
output: pow_blue_led
id: led
sensor:
- platform: wifi_signal
name: "${plug_name}_wifi_signal"
update_interval: 60s
- platform: uptime
name: "${plug_name}_uptime"
icon: mdi:clock-outline
- platform: hlw8012
sel_pin:
number: GPIO12
inverted: True
cf_pin: GPIO05
cf1_pin: GPIO14
current_resistor: ${current_res}
voltage_divider: ${voltage_div}
current:
name: "${plug_name}_Amperage"
unit_of_measurement: A
accuracy_decimals: 3
icon: mdi:flash-circle
voltage:
name: "${plug_name}_Voltage"
unit_of_measurement: V
icon: mdi:flash-circle
power:
id: power
name: "${plug_name}_Wattage"
unit_of_measurement: W
icon: mdi:flash-circle
change_mode_every: 8
update_interval: 10s
- platform: total_daily_energy
name: "${plug_name} Denní spotřeba"
power_id: power
filters:
# Nasobici faktor pro prevod z W na kW je 0.001
- multiply: 0.001
unit_of_measurement: kWh
icon: mdi:clock-alert
text_sensor:
- platform: version
name: "${plug_name} Verze firmware"
status_led:
pin:
number: GPIO02
inverted: True
time:
- platform: sntp
id: my_time