-
Notifications
You must be signed in to change notification settings - Fork 31
/
utility-bridge.yaml
106 lines (88 loc) · 2.16 KB
/
utility-bridge.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
substitutions:
devicename: utility_bridge
upper_devicename: Utility Bridge
esphome:
name: utility-bridge
comment: Fan controller
esp32:
board: esp32doit-devkit-v1
framework:
type: arduino
# Enable logging
logger:
level: DEBUG
# Enable Home Assistant API
api:
password: !secret esphome_utility_bridge_api_password
services:
- service: set_speed
variables:
run_speed: int
run_time: int
then:
- lambda: |-
zehnder_fan->setSpeed(run_speed, run_time);
ota:
password: !secret esphome_utility_bridge_ota_password
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
manual_ip:
static_ip: !secret wifi_ip_utility_bridge
gateway: !secret wifi_gateway
subnet: !secret wifi_subnet
dns1: !secret wifi_gateway
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "utility-bridge Fallback"
password: !secret esphome_utility_bridge_ap_password
captive_portal:
time:
- platform: homeassistant
id: homeassistant_time
timezone: Europe/Amsterdam
button:
- platform: restart
id: ${devicename}_esphome_restart
name: ${upper_devicename} herstart
- platform: template
id: ${devicename}_high_10
name: ${upper_devicename} High 10
on_press:
then:
lambda: |-
zehnder_fan->setSpeed(3, 10);
- platform: template
id: ${devicename}_high_30
name: ${upper_devicename} High 30
on_press:
then:
lambda: |-
zehnder_fan->setSpeed(3, 30);
# Load external components
# https://esphome.io/components/external_components.html#external-components-git
external_components:
- source: github://Sanderhuisman/ESPHome-Zehnder-RF
# SPI
spi:
clk_pin: GPIO14
mosi_pin: GPIO13
miso_pin: GPIO12
# nRF905 config
nrf905:
id: "nrf905_rf"
cs_pin: GPIO23
cd_pin: GPIO33
ce_pin: GPIO27
pwr_pin: GPIO26
txen_pin: GPIO25
# We don't need AM and DR at the moment as they are read from the inernal registers
# am_pin: GPIO32
# dr_pin: GPIO35
# The FAN controller
fan:
- platform: zehnder
id: zehnder_fan
name: "Ventilation"
nrf905: nrf905_rf
update_interval: "60s"