-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathkitchen.yaml
126 lines (105 loc) · 2.37 KB
/
kitchen.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
esphome:
name: kitchen
platform: ESP8266
board: esp12e
wifi:
ssid: !secret wifi-east
password: !secret wifi-pwd
use_address: esp-kitchen.ak-online.be
mdns:
disabled: true
captive_portal:
# Enable logging
logger:
# Enable Home Assistant API
#api:
mqtt:
broker: mqtt.ak-online.be
discovery: true
topic_prefix: esphome/kitchen
ota:
web_server:
port: 80
include_internal: true
i2c:
sda: GPIO4
scl: GPIO5
scan: True
button:
- platform: restart
name: restart
sensor:
- platform: wifi_signal
name: "WiFi Signal ESP Kitchen"
update_interval: 60s
- platform: bme280
temperature:
name: "Kitchen Temperature"
oversampling: 16x
pressure:
name: "Kitchen Pressure"
humidity:
name: "Kitchen Humidity"
address: 0x76
update_interval: 30s
# - platform: rotary_encoder
# name: "Kitchen Rotary Encoder"
# id: encoder
# pin_a: GPIO02
# pin_b: GPIO13
# min_value: 0
# max_value: 25
# on_value:
# - light.turn_on:
# id: kitchen_light
# brightness: !lambda return x/25.5;
switch:
- platform: gpio
pin:
number: GPIO16
name: Kitchen Rotary Encoder Button
internal: true
on_turn_on:
- light.toggle: kitchen_light
light:
- platform: monochromatic
name: "Kitchen Light"
id: "kitchen_light"
default_transition_length: 0.0s
output: fake_out
# gamma is really important here - it would skew the calculations in the output
gamma_correct: 1.0
- platform: monochromatic
id: "back_light"
default_transition_length: 0.0s
output: out_back
gamma_correct: 1.0
- platform: monochromatic
id: "front_light"
default_transition_length: 0.0s
output: out_front
gamma_correct: 1.0
output:
- platform: template
id: fake_out
type: float
write_action:
- light.control:
id: "back_light"
brightness: !lambda return clamp( state * 1.2f, 0.0f, 1.0f);
state: on
- light.control:
id: "front_light"
brightness: !lambda return clamp((state - 0.5f)*2, 0.0f, 1.0f);
state: on
# - sensor.rotary_encoder.set_value:
# id: encoder
# value: !lambda return (state * 25.5);
- platform: esp8266_pwm
id: out_front
pin: GPIO12
frequency: 250 Hz
- platform: esp8266_pwm
id: out_back
pin: GPIO14
frequency: 250 Hz