Add documentation for dsmr config flow (#17757)

This commit is contained in:
Rob Bierbooms 2021-06-24 10:16:15 +02:00 committed by GitHub
parent 84ce484d90
commit db1dc40155
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,6 +6,7 @@ ha_category:
- Energy
ha_release: 0.34
ha_iot_class: Local Push
ha_config_flow: true
ha_domain: dsmr
ha_codeowners:
- '@Robbie1221'
@ -49,77 +50,7 @@ DIY solutions (ESP8266 based):
- [esp8266_p1meter (fliphess)](https://github.com/fliphess/esp8266_p1meter)
```yaml
# Example configuration.yaml entry
sensor:
- platform: dsmr
```
{% configuration %}
port:
description: "Serial port to which Smartmeter is connected via USB. For remote (i.e., ser2net) connections, use TCP port number to connect to (i.e., 2001)."
required: false
type: string
default: "/dev/ttyUSB0"
host:
description: "Host to which Smartmeter is connected via serial or USB, see **port**. For remote connections, use IP address of host to connect to (i.e., 192.168.1.13)."
required: false
type: string
dsmr_version:
description: "Version of DSMR used by meter. Choices: `2.2`, `4`, `5`, `5B` (For Belgian Meter), `5L` (For Smarty Meter)."
required: false
type: string
default: "2.2"
reconnect_interval:
description: The reconnect interval in seconds when the connection is lost with the Smartmeter.
required: false
type: integer
default: 30
precision:
description: Defines the precision of the calculated values, through the argument of round().
required: false
type: integer
default: 3
{% endconfiguration %}
Full configuration examples can be found below:
```yaml
# Example configuration.yaml entry for USB/serial connected Smartmeter
sensor:
- platform: dsmr
port: /dev/ttyUSB1
dsmr_version: 5
group:
meter_readings:
name: Meter readings
entities:
- sensor.energy_consumption_tarif_1
- sensor.energy_consumption_tarif_2
- sensor.energy_production_tarif_1
- sensor.energy_production_tarif_2
- sensor.gas_consumption
```
```yaml
# Example configuration.yaml entry for remote (TCP/IP, i.e., via ser2net) connection to host which is connected to Smartmeter
sensor:
- platform: dsmr
host: 192.168.1.13
port: 2001
dsmr_version: 5
group:
meter_readings:
name: Meter readings
entities:
- sensor.energy_consumption_tarif_1
- sensor.energy_consumption_tarif_2
- sensor.energy_production_tarif_1
- sensor.energy_production_tarif_2
- sensor.gas_consumption
```
{% include integrations/config_flow.md %}
Optional configuration example for ser2net: