-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathmultical402.yaml
111 lines (97 loc) · 2.25 KB
/
multical402.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
substitutions:
device_name: multical402
friendly_name: Multical 402
esphome:
name: ${device_name}
platform: ESP8266
board: d1_mini
includes:
- kmp.h
- multical402.h
ota:
api:
wifi:
ssid: INSERT_WIFI_SSID
password: INSERT_WIFI_PASSWORD
# Enable UART for logger:
logger:
#Multical UART
uart:
- id: uart_bus
rx_pin: D1
tx_pin: D2
baud_rate: 1200
data_bits: 8
parity: NONE
stop_bits: 1
#Multical Custom Sensor (first variable is update interval in ms; 3600000 is 1 hour)
custom_component:
- lambda: |-
auto multical402 = new Multical402(
10000,
id(uart_bus),
id(m_energy),
id(m_power),
id(m_tin),
id(m_tout),
id(m_tdiff),
id(m_flow),
id(m_volume));
App.register_component(multical402);
return {multical402};
components:
- id: multical
sensor:
#Multical Custom Sensors
- name: "Multical Energy"
platform: template
id: m_energy
icon: "mdi:lightning-bolt"
unit_of_measurement: MWh
accuracy_decimals: 3
state_class: "total_increasing"
device_class: "energy"
- name: "Multical Volume"
platform: template
id: m_volume
unit_of_measurement: m3
accuracy_decimals: 2
state_class: "measurement"
- name: "Multical Temperature In"
platform: template
id: m_tin
icon: "mdi:thermometer"
unit_of_measurement: °C
accuracy_decimals: 2
state_class: "measurement"
device_class: "temperature"
- name: "Multical Temperature Out"
platform: template
id: m_tout
icon: "mdi:thermometer"
unit_of_measurement: °C
accuracy_decimals: 2
state_class: "measurement"
device_class: "temperature"
- name: "Multical Temperature Diff"
platform: template
id: m_tdiff
icon: "mdi:thermometer"
unit_of_measurement: °C
accuracy_decimals: 2
state_class: "measurement"
device_class: "temperature"
- name: "Multical Power"
platform: template
id: m_power
icon: "mdi:flash"
unit_of_measurement: kW
accuracy_decimals: 1
state_class: "measurement"
device_class: "power"
- name: "Multical Flow"
platform: template
id: m_flow
unit_of_measurement: l/h
accuracy_decimals: 0
state_class: "measurement"