You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+19Lines changed: 19 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,8 +36,22 @@ wmbus_common:
36
36
drivers:
37
37
- apator162
38
38
- amiplus
39
+
# or specify drivers and their fields to be loaded
40
+
drivers:
41
+
- name: apator162
42
+
fields:
43
+
- total_m3
44
+
- amiplus
45
+
- name: sensostar
46
+
fields:
47
+
- total_kwh
48
+
- waterstarm
39
49
```
40
50
51
+
If you use `wmbus_meter` component, you may not need to configure `wmbus_common` component, as it will be automatically included as a dependency. Dependent components will automatically load required drivers and fields based on their configuration, so specifying them on this level is redundant.
52
+
53
+
However, if you want to load specific drivers or fields that are not required by any dependent component, you should specify them in `wmbus_common` configuration.
54
+
41
55
`wmbusmeters` is included as a git subtree. To sync version from upstream repository, run:
42
56
43
57
```bash
@@ -69,6 +83,9 @@ wmbus_meter:
69
83
`mode`parameter is optional and allows to filter received packets by mode. It can be set to `T1` or `C1`. If not set, all packets will be processed.
70
84
`key`parameter is optional and allows to decrypt packets using AES-128-CBC encryption. It should be provided as hexadecimal or ASCII encoded string. If not set, packets will be processed as unencrypted.
71
85
86
+
**Attention!**
87
+
By default, component will not load any fields to reduce memory footprint. If you need specific fields (or all fields) you can specify them in `wmbus_common` component configuration. Only specified fields will be available in `meter` variable in `on_telegram` trigger, will be serialized with `as_json` method etc.
88
+
72
89
Component provides `on_telegram` trigger that can be used to send data to a remote server or process it in any other way. It can be used to send data to MQTT broker, HTTP server, or any other service. `meter` variable is available in the following lambdas.
73
90
Additionally, `wmbus_meter.send_telegram_with_mqtt` action can be used to send JSON-encoded meter data to MQTT broker. It requires `mqtt` component to be configured in ESPHome.
74
91
@@ -97,6 +114,8 @@ On the `wmbus_meter` platform, you can use the following sensors to provide data
97
114
field: timestamp
98
115
```
99
116
117
+
When you use `sensor` and `text_sensor` platforms, required fields will be automatically loaded for corresponding driver, so you don't need to specify them in `wmbus_common` component configuration.
118
+
100
119
For both `sensor` and `text_sensor`, all config from generic [Sensor](https://esphome.io/components/sensor/index.html) and [Text Sensor](https://esphome.io/components/text_sensor/index.html) components is available, so you can use filters, icons, etc.
0 commit comments