-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathliving_room_light_switch.yaml
90 lines (80 loc) · 1.67 KB
/
living_room_light_switch.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
substitutions:
devicename: living_room_light_switch
esphome:
name: ${devicename}
platform: ESP8266
board: esp01_1m
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
manual_ip:
static_ip: !secret living_room_light_switch_ip
gateway: !secret gateway
subnet: !secret subnet
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
i2c:
sda: GPIO12
scl: GPIO14
binary_sensor:
- platform: gpio
pin:
number: GPIO13
name: "Wall Switch"
on_state:
then:
- switch.toggle: relay
- platform: gpio
pin:
number: GPIO5
name: "Wall Switch 2"
on_state:
then:
- switch.toggle: relay
sensor:
- platform: ntc
sensor: resistance_sensor
id: temperature
name: "Living room Light Switch Temperature"
unit_of_measurement: "°C"
accuracy_decimals: 1
icon: mdi:thermometer
calibration:
b_constant: 3350
reference_temperature: 25°C
reference_resistance: 10kOhm
- platform: adc
id: source_sensor
pin: A0
update_interval: 10s
- platform: resistance
id: resistance_sensor
sensor: source_sensor
configuration: DOWNSTREAM
resistor: 32kOhm
- platform: ade7953
voltage:
name: "Living room Light Switch Voltage"
current_a:
name: "ADE7953 Current 1"
current_b:
name: "ADE7953 Current 2"
active_power_a:
name: "ADE7953 Power 1"
active_power_b:
name: "ADE7953 Power 2"
filters:
- multiply: -1.0
status_led:
pin:
number: GPIO0
inverted: yes
switch:
- platform: gpio
id: relay
name: "Living room Light Switch Relay"
pin: GPIO04
restore_mode: ALWAYS_OFF