-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmirabella_genio_gpo.yaml
109 lines (94 loc) · 2.21 KB
/
mirabella_genio_gpo.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
# -------------------------------------
# ---- Implemented on Mirabella Genio Wi-Fi Power Plug with Energy Monitoring ----
# https://templates.blakadder.com/mirabella_genio_42905868.html
# -------------------------------------
substitutions:
devicename: mirabella_genio_gpo
esphome:
name: ${devicename}
platform: ESP8266
board: esp8285
wifi:
power_save_mode: light # power reduced from 1.2w to 0.8w
#fast_connect: true
networks:
- ssid: !secret wifi_ssid
password: !secret wifi_password
hidden: True
manual_ip:
static_ip: !secret ip_mirabella_genio_gpo
gateway: !secret ip_gateway
subnet: 255.255.255.0
domain: .homelan
ap: # Enable fallback hotspot (captive portal) in case wifi connection fails
ssid: "${devicename} Hotspot"
password: !secret password
captive_portal:
# Enable logging
logger:
# Enable Home Assistant API
api:
reboot_timeout: 0s # Dont reboot..
encryption:
key: !secret encryption_key
ota:
password: !secret password
web_server:
port: 80
auth:
username: admin
password: !secret password
sensor:
- platform: hlw8012
sel_pin:
number: GPIO12
inverted: True
cf_pin: GPIO04
cf1_pin: GPIO05
current_resistor: 0.002500
# current_resistor: 0.002600 100w low
# current_resistor: 0.002770 200w low
voltage_divider: 829
# voltage_divider: 800 9.2v under
# voltage_divider: 1000 53v over
# voltage_divider: 922 30v over
current:
name: ${devicename} Current
unit_of_measurement: A
voltage:
name: ${devicename} Voltage
unit_of_measurement: V
power:
name: ${devicename} Power
id: switch_power
unit_of_measurement: W
change_mode_every: 1
update_interval: 2s
binary_sensor:
- platform: gpio
id: button_1
pin: GPIO03
on_press:
then:
- switch.toggle: relay_1
switch:
- platform: gpio
id: relay_1
name: ${devicename} Relay
pin:
number: GPIO14
inverted: no
on_turn_on:
- light.turn_on: stat_led
on_turn_off:
- light.turn_off: stat_led
light:
- platform: status_led
id: stat_led
pin:
number: GPIO13
inverted: yes
#status_led:
# pin:
# number: GPIO13
# inverted: yes