Config UI: use modbus defaults when testing/creating device (#13815)
This commit is contained in:
parent
20d0320137
commit
86b3207045
3 changed files with 30 additions and 0 deletions
|
|
@ -235,9 +235,19 @@ export default {
|
|||
modbusCapabilities() {
|
||||
return this.modbus?.Choice || [];
|
||||
},
|
||||
modbusDefaults() {
|
||||
const { ID, Comset, Baudrate, Port } = this.modbus || {};
|
||||
return {
|
||||
id: ID,
|
||||
comset: Comset,
|
||||
baudrate: Baudrate,
|
||||
port: Port,
|
||||
};
|
||||
},
|
||||
apiData() {
|
||||
return {
|
||||
template: this.templateName,
|
||||
...this.modbusDefaults,
|
||||
...this.values,
|
||||
usage: this.meterType,
|
||||
};
|
||||
|
|
|
|||
10
i18n/de.toml
10
i18n/de.toml
|
|
@ -72,6 +72,16 @@ template = "Hersteller"
|
|||
titleChoice = "Was möchtest du hinzufügen?"
|
||||
validateSave = "Überprüfen & speichern"
|
||||
|
||||
[config.options]
|
||||
|
||||
[config.options.endianness]
|
||||
big = "big-endian"
|
||||
little = "little-endian"
|
||||
|
||||
[config.options.schema]
|
||||
http = "HTTP (unverschlüsselt)"
|
||||
https = "HTTPS (verschlüsselt)"
|
||||
|
||||
[config.pv]
|
||||
titleAdd = "Zähler (PV) hinzufügen"
|
||||
titleEdit = "Zähler (PV) bearbeiten"
|
||||
|
|
|
|||
10
i18n/en.toml
10
i18n/en.toml
|
|
@ -72,6 +72,16 @@ template = "Manufacturer"
|
|||
titleChoice = "What Do You Want To Add?"
|
||||
validateSave = "Validate & save"
|
||||
|
||||
[config.options]
|
||||
|
||||
[config.options.endianness]
|
||||
big = "big-endian"
|
||||
little = "little-endian"
|
||||
|
||||
[config.options.schema]
|
||||
http = "HTTP (unencrypted)"
|
||||
https = "HTTPS (encrypted)"
|
||||
|
||||
[config.pv]
|
||||
titleAdd = "Add Solar Meter"
|
||||
titleEdit = "Edit Solar Meter"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue