-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhumidifer.yaml
77 lines (66 loc) · 2.21 KB
/
humidifer.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
esphome:
name: humidifer
friendly_name: Topcom Humidifier
includes:
- humidifier.h
esp32:
board: lolin32_lite # esp32dev
framework:
type: arduino
# Enable logging
logger:
switch:
sensor:
binary_sensor:
button:
- platform: restart
id: reset_button
name: "Restart Controller"
climate:
- platform: custom
# id: humidifer
lambda: |-
auto ca = new esphome::topcom::TopcomHumidfierComponent();
App.register_component(ca);
ca->air_temperature = new Sensor("Air Temperature");
ca->air_temperature->set_unit_of_measurement("°C");
ca->air_temperature->set_device_class("temperature");
ca->air_temperature->set_state_class(STATE_CLASS_MEASUREMENT);
App.register_sensor(ca->air_temperature);
ca->air_humdity = new Sensor("Air Humidity");
ca->air_humdity->set_unit_of_measurement("%");
ca->air_humdity->set_device_class("humidity");
ca->air_humdity->set_state_class(STATE_CLASS_MEASUREMENT);
App.register_sensor(ca->air_humdity);
ca->timer_rest_time = new Sensor("Timer time left");
ca->timer_rest_time->set_unit_of_measurement("h");
App.register_sensor(ca->timer_rest_time);
ca->is_water_present = new BinarySensor();
ca->is_water_present->set_name("Water Present");
App.register_binary_sensor(ca->is_water_present);
ca->ion_button = new esphome::topcom::IonSwitch("Ion Switch", ca);
App.register_switch(ca->ion_button);
ca->heat_button = new esphome::topcom::HeatSwitch("Heating Switch", ca);
App.register_switch(ca->heat_button);
ca->timer_button = new esphome::topcom::TimerButton("Timer button", ca);
App.register_button(ca->timer_button);
ca->humidity_button = new esphome::topcom::HumidityButton("Humidity button", ca);
App.register_button(ca->humidity_button);
App.register_climate(ca);
return {ca};
climates:
- name: "Topcom 1901W"
id: humdifier_1901w
api:
encryption:
key: !secret topcom_encryption_key
ota:
password: !secret topcom_ota_password
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Topcom Fallback Hotspot"
password: !secret topcom_ap_password
captive_portal: