Templates: remove unmaintained allinone/linked templates (BC) (#26635)
This commit is contained in:
parent
9ea212f0b4
commit
db1d1d074c
57 changed files with 10 additions and 121 deletions
|
|
@ -13,7 +13,6 @@ requirements:
|
|||
params:
|
||||
- name: usage
|
||||
choice: ["grid", "pv", "battery"]
|
||||
allinone: true
|
||||
- name: modbus
|
||||
choice: ["rs485", "tcpip"]
|
||||
baudrate: 9600
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ capabilities: ["battery-control"]
|
|||
params:
|
||||
- name: usage
|
||||
choice: ["grid", "pv", "battery"]
|
||||
allinone: true
|
||||
- name: host
|
||||
- name: port
|
||||
default: 80
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ requirements:
|
|||
params:
|
||||
- name: usage
|
||||
choice: ["grid", "pv", "battery"]
|
||||
allinone: true
|
||||
- name: uri
|
||||
- preset: battery-params
|
||||
render: |
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ capabilities: ["battery-control"]
|
|||
params:
|
||||
- name: usage
|
||||
choice: ["grid", "pv", "battery"]
|
||||
allinone: true
|
||||
- name: modbus
|
||||
choice: ["rs485", "tcpip"]
|
||||
baudrate: 9600
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ capabilities: ["battery-control"]
|
|||
params:
|
||||
- name: usage
|
||||
choice: ["grid", "pv", "battery"]
|
||||
allinone: true
|
||||
- name: modbus
|
||||
choice: ["rs485", "tcpip"]
|
||||
baudrate: 9600
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ products:
|
|||
params:
|
||||
- name: usage
|
||||
choice: ["grid", "pv", "battery"]
|
||||
allinone: true
|
||||
- name: host
|
||||
- name: port
|
||||
default: 502
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@ requirements:
|
|||
params:
|
||||
- name: usage
|
||||
choice: ["grid", "pv", "battery"]
|
||||
allinone: true
|
||||
- name: host
|
||||
- name: port
|
||||
default: 5033
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ requirements:
|
|||
params:
|
||||
- name: usage
|
||||
choice: ["grid", "pv", "battery"]
|
||||
allinone: true
|
||||
- name: accesskey
|
||||
required: true
|
||||
description:
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@ requirements:
|
|||
params:
|
||||
- name: usage
|
||||
choice: ["grid", "pv", "battery"]
|
||||
allinone: true
|
||||
- name: host
|
||||
- name: port
|
||||
default: 502
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ requirements:
|
|||
params:
|
||||
- name: usage
|
||||
choice: ["grid", "pv", "battery"]
|
||||
allinone: true
|
||||
- name: host
|
||||
- name: user
|
||||
default: customer
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ capabilities: ["battery-control"]
|
|||
params:
|
||||
- name: usage
|
||||
choice: ["grid", "pv", "battery"]
|
||||
allinone: true
|
||||
- name: host
|
||||
- name: port
|
||||
default: 502
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ requirements:
|
|||
params:
|
||||
- name: usage
|
||||
choice: ["grid", "pv", "battery"]
|
||||
allinone: true
|
||||
- name: uri
|
||||
description:
|
||||
en: IP address or hostname
|
||||
|
|
|
|||
|
|
@ -19,7 +19,6 @@ requirements:
|
|||
params:
|
||||
- name: usage
|
||||
choice: ["grid", "pv", "battery"]
|
||||
allinone: true
|
||||
- name: host
|
||||
- name: port
|
||||
default: 502
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ products:
|
|||
params:
|
||||
- name: usage
|
||||
choice: ["grid", "pv", "battery"]
|
||||
allinone: true
|
||||
- name: modbus
|
||||
choice: ["tcpip"]
|
||||
- preset: battery-params
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ capabilities: ["battery-control"]
|
|||
params:
|
||||
- name: usage
|
||||
choice: ["grid", "pv", "battery"]
|
||||
allinone: true
|
||||
- name: storageunit
|
||||
type: int
|
||||
default: 1
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@ requirements:
|
|||
params:
|
||||
- name: usage
|
||||
choice: ["grid", "pv", "battery"]
|
||||
allinone: true
|
||||
- name: modbus
|
||||
choice: ["rs485", "tcpip"]
|
||||
- name: timeout
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ products:
|
|||
params:
|
||||
- name: usage
|
||||
choice: ["grid", "pv", "battery"]
|
||||
allinone: true
|
||||
- name: host
|
||||
- preset: battery-params
|
||||
render: |
|
||||
|
|
|
|||
|
|
@ -6,12 +6,6 @@ products:
|
|||
- brand: Steca
|
||||
description:
|
||||
generic: coolcept fleX
|
||||
linked:
|
||||
- template: kostal-ksem-inverter
|
||||
usage: grid
|
||||
- template: kostal-ksem
|
||||
usage: grid
|
||||
excludetemplate: kostal-ksem-inverter
|
||||
params:
|
||||
- name: usage
|
||||
choice: ["pv"]
|
||||
|
|
|
|||
|
|
@ -5,12 +5,6 @@ products:
|
|||
de: Plenticore Hybrid, inkl. Netzladung der Hausbatterie
|
||||
en: Plenticore Hybrid, incl. grid charging of the house battery
|
||||
capabilities: ["battery-control"]
|
||||
linked:
|
||||
- template: kostal-ksem-inverter
|
||||
usage: grid
|
||||
- template: kostal-ksem
|
||||
usage: grid
|
||||
excludetemplate: kostal-ksem-inverter
|
||||
covers: ["kostal-plenticore-hw0200"]
|
||||
requirements:
|
||||
description:
|
||||
|
|
@ -25,7 +19,6 @@ requirements:
|
|||
params:
|
||||
- name: usage
|
||||
choice: ["pv", "battery"]
|
||||
allinone: true
|
||||
- name: modbus
|
||||
choice: ["tcpip"]
|
||||
id: 71
|
||||
|
|
|
|||
|
|
@ -4,12 +4,6 @@ products:
|
|||
description:
|
||||
generic: Plenticore Hybrid
|
||||
capabilities: ["battery-control"]
|
||||
linked:
|
||||
- template: kostal-ksem-inverter
|
||||
usage: grid
|
||||
- template: kostal-ksem
|
||||
usage: grid
|
||||
excludetemplate: kostal-ksem-inverter
|
||||
requirements:
|
||||
description:
|
||||
de: |
|
||||
|
|
@ -21,7 +15,6 @@ requirements:
|
|||
params:
|
||||
- name: usage
|
||||
choice: ["pv", "battery"]
|
||||
allinone: true
|
||||
- name: modbus
|
||||
choice: ["tcpip"]
|
||||
id: 71
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ capabilities: ["battery-control"]
|
|||
params:
|
||||
- name: usage
|
||||
choice: ["grid", "pv", "battery"]
|
||||
allinone: true
|
||||
- name: host
|
||||
- name: password
|
||||
help:
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ requirements:
|
|||
params:
|
||||
- name: usage
|
||||
choice: ["grid", "pv", "battery"]
|
||||
allinone: true
|
||||
- name: host
|
||||
- name: password
|
||||
help:
|
||||
|
|
|
|||
|
|
@ -28,7 +28,6 @@ requirements:
|
|||
params:
|
||||
- name: usage
|
||||
choice: ["grid", "pv", "battery"]
|
||||
allinone: true
|
||||
- name: modbus
|
||||
choice: ["tcpip"]
|
||||
default: "tcpip"
|
||||
|
|
|
|||
|
|
@ -28,7 +28,6 @@ requirements:
|
|||
params:
|
||||
- name: usage
|
||||
choice: ["grid", "pv", "battery"]
|
||||
allinone: true
|
||||
- name: host
|
||||
- name: password
|
||||
mask: true
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ requirements:
|
|||
params:
|
||||
- name: usage
|
||||
choice: ["grid", "pv", "battery"]
|
||||
allinone: true
|
||||
- name: modbus
|
||||
choice: ["tcpip"]
|
||||
id: 1
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ products:
|
|||
params:
|
||||
- name: usage
|
||||
choice: ["grid", "pv"]
|
||||
allinone: true
|
||||
- name: modbus
|
||||
choice: ["tcpip"]
|
||||
render: |
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@ requirements:
|
|||
params:
|
||||
- name: usage
|
||||
choice: ["grid", "pv", "battery"]
|
||||
allinone: true
|
||||
- name: region
|
||||
description:
|
||||
de: Region
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ requirements:
|
|||
params:
|
||||
- name: usage
|
||||
choice: ["grid", "pv", "battery"]
|
||||
allinone: true
|
||||
- name: host
|
||||
- name: externalpower
|
||||
type: bool
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ capabilities: ["battery-control"]
|
|||
params:
|
||||
- name: usage
|
||||
choice: ["grid", "pv", "battery"]
|
||||
allinone: true
|
||||
- name: host
|
||||
- name: schema
|
||||
- preset: battery-params
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ requirements:
|
|||
params:
|
||||
- name: usage
|
||||
choice: ["grid", "pv", "battery"]
|
||||
allinone: true
|
||||
- name: modbus
|
||||
choice: ["tcpip"]
|
||||
- preset: battery-params
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ requirements:
|
|||
params:
|
||||
- name: usage
|
||||
choice: ["grid", "pv", "battery"]
|
||||
allinone: true
|
||||
- name: host
|
||||
- name: port
|
||||
default: 502
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ requirements:
|
|||
params:
|
||||
- name: usage
|
||||
choice: ["grid", "pv", "battery"]
|
||||
allinone: true
|
||||
- name: modbus
|
||||
choice: ["tcpip"]
|
||||
id: 2
|
||||
|
|
|
|||
|
|
@ -6,26 +6,6 @@ products:
|
|||
capabilities: ["smahems"]
|
||||
requirements:
|
||||
evcc: ["skiptest"]
|
||||
linked:
|
||||
- template: sma-energy-meter
|
||||
usage: pv
|
||||
- template: sma-hybrid
|
||||
usage: pv
|
||||
multiple: true
|
||||
excludetemplate: sma-energy-meter
|
||||
- template: sma-inverter
|
||||
usage: pv
|
||||
multiple: true
|
||||
excludetemplate: sma-energy-meter
|
||||
- template: sma-hybrid
|
||||
usage: battery
|
||||
multiple: true
|
||||
- template: sma-inverter-speedwire
|
||||
usage: battery
|
||||
multiple: true
|
||||
- template: sma-inverter-modbus
|
||||
usage: battery
|
||||
multiple: true
|
||||
params:
|
||||
- name: usage
|
||||
choice: ["grid"]
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ requirements:
|
|||
params:
|
||||
- name: usage
|
||||
choice: ["pv", "battery", "grid"]
|
||||
allinone: true
|
||||
- name: modbus
|
||||
choice: ["tcpip"]
|
||||
port: 502
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ products:
|
|||
params:
|
||||
- name: usage
|
||||
choice: ["pv"]
|
||||
allinone: true
|
||||
- name: modbus
|
||||
choice: ["tcpip"]
|
||||
port: 502
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@ requirements:
|
|||
params:
|
||||
- name: usage
|
||||
choice: ["grid", "pv", "battery"]
|
||||
allinone: true
|
||||
- name: modbus
|
||||
choice: ["tcpip", "rs485"]
|
||||
id: 1
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ requirements:
|
|||
params:
|
||||
- name: usage
|
||||
choice: ["grid", "pv"]
|
||||
allinone: true
|
||||
- name: modbus
|
||||
choice: ["tcpip", "rs485"]
|
||||
id: 1
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ requirements:
|
|||
params:
|
||||
- name: usage
|
||||
choice: ["grid", "pv"]
|
||||
allinone: true
|
||||
- name: host
|
||||
- name: port
|
||||
default: 502
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ requirements:
|
|||
params:
|
||||
- name: usage
|
||||
choice: ["grid", "pv", "battery"]
|
||||
allinone: true
|
||||
- name: modbus
|
||||
choice: ["tcpip"]
|
||||
id: 1
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ requirements:
|
|||
params:
|
||||
- name: usage
|
||||
choice: ["grid", "pv", "battery"]
|
||||
allinone: true
|
||||
- name: host
|
||||
- preset: battery-params
|
||||
render: |
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ products:
|
|||
params:
|
||||
- name: usage
|
||||
choice: ["grid", "pv", "battery"]
|
||||
allinone: true
|
||||
- name: host
|
||||
- name: port
|
||||
default: 8080
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ products:
|
|||
params:
|
||||
- name: usage
|
||||
choice: ["grid", "pv", "battery"]
|
||||
allinone: true
|
||||
- name: host
|
||||
- preset: battery-params
|
||||
render: |
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@ requirements:
|
|||
params:
|
||||
- name: usage
|
||||
choice: ["grid", "pv", "battery"]
|
||||
allinone: true
|
||||
- name: tokenid
|
||||
required: true
|
||||
description:
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ capabilities: ["battery-control"]
|
|||
params:
|
||||
- name: usage
|
||||
choice: ["grid", "pv", "battery"]
|
||||
allinone: true
|
||||
- name: modbus
|
||||
choice: ["rs485", "tcpip"]
|
||||
baudrate: 19200
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@ requirements:
|
|||
params:
|
||||
- name: usage
|
||||
choice: ["grid", "pv", "battery"]
|
||||
allinone: true
|
||||
- name: modbus
|
||||
choice: ["rs485"]
|
||||
baudrate: 9600
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ products:
|
|||
params:
|
||||
- name: usage
|
||||
choice: ["grid", "pv", "battery"]
|
||||
allinone: true
|
||||
- name: modbus
|
||||
choice: ["rs485"]
|
||||
baudrate: 9600
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@ requirements:
|
|||
params:
|
||||
- name: usage
|
||||
choice: ["grid", "pv", "battery"]
|
||||
allinone: true
|
||||
- name: host
|
||||
- name: port
|
||||
default: 8080
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ requirements:
|
|||
params:
|
||||
- name: usage
|
||||
choice: ["grid", "pv", "battery"]
|
||||
allinone: true
|
||||
- name: modbus
|
||||
choice: ["rs485", "tcpip"]
|
||||
baudrate: 9600
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ products:
|
|||
params:
|
||||
- name: usage
|
||||
choice: ["grid", "pv"]
|
||||
allinone: true
|
||||
- name: modbus
|
||||
choice: ["rs485", "tcpip"]
|
||||
baudrate: 9600
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ group: generic
|
|||
params:
|
||||
- name: usage
|
||||
choice: ["grid", "pv", "battery"]
|
||||
allinone: true
|
||||
- name: modbus
|
||||
choice: ["tcpip", "rs485"]
|
||||
- name: maxacpower
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@ requirements:
|
|||
params:
|
||||
- name: usage
|
||||
choice: ["grid", "pv", "battery"]
|
||||
allinone: true
|
||||
- name: host
|
||||
- name: password
|
||||
required: true
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@ requirements:
|
|||
params:
|
||||
- name: usage
|
||||
choice: ["grid", "pv", "battery"]
|
||||
allinone: true
|
||||
- name: host
|
||||
- name: port
|
||||
default: 502
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ capabilities: ["battery-control"]
|
|||
params:
|
||||
- name: usage
|
||||
choice: ["grid", "pv", "battery"]
|
||||
allinone: true
|
||||
- name: host
|
||||
- name: port
|
||||
default: 502
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ capabilities: ["battery-control"]
|
|||
params:
|
||||
- name: usage
|
||||
choice: ["grid", "pv", "battery"]
|
||||
allinone: true
|
||||
- name: modbus
|
||||
choice: ["rs485"]
|
||||
port: 502
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ capabilities: ["battery-control"]
|
|||
params:
|
||||
- name: usage
|
||||
choice: ["grid", "pv", "battery"]
|
||||
allinone: true
|
||||
- name: modbus
|
||||
choice: ["rs485"]
|
||||
port: 502
|
||||
|
|
|
|||
|
|
@ -22,12 +22,6 @@ type Template struct {
|
|||
titles []string
|
||||
}
|
||||
|
||||
// GuidedSetupEnabled returns true if there are linked templates or >1 usage
|
||||
func (t *Template) GuidedSetupEnabled() bool {
|
||||
_, p := t.ParamByName(ParamUsage)
|
||||
return len(t.Linked) > 0 || (len(p.Choice) > 1 && p.IsAllInOne())
|
||||
}
|
||||
|
||||
// UpdateParamWithDefaults adds default values to specific param name entries
|
||||
func (t *Template) UpdateParamsWithDefaults() error {
|
||||
for i, p := range t.Params {
|
||||
|
|
|
|||
|
|
@ -163,14 +163,6 @@ type Requirements struct {
|
|||
Description TextLanguage // Description of requirements, e.g. how the device needs to be prepared
|
||||
}
|
||||
|
||||
// Linked Template
|
||||
type LinkedTemplate struct {
|
||||
Template string
|
||||
Usage string // usage: "grid", "pv", "battery"
|
||||
Multiple bool // if true, multiple instances of this template can be added
|
||||
ExcludeTemplate string // only consider this if no device of the named linked template was added
|
||||
}
|
||||
|
||||
// Param is a proxy template parameter
|
||||
// Params can be defined:
|
||||
// 1. in the template: uses entries in 4. for default properties and values, can be overwritten here
|
||||
|
|
@ -201,7 +193,6 @@ type Param struct {
|
|||
Type ParamType // string representation of the value type, "string" is default
|
||||
Choice []string `json:",omitempty"` // defines a set of choices, e.g. "grid", "pv", "battery", "charge" for "usage"
|
||||
Service string `json:",omitempty"` // defines a service to provide choices
|
||||
AllInOne bool `json:"-"` // defines if the defined usages can all be present in a single device
|
||||
|
||||
// TODO move somewhere else should not be part of the param definition
|
||||
Baudrate int `json:",omitempty"` // device specific default for modbus RS485 baudrate
|
||||
|
|
@ -251,10 +242,6 @@ func (p *Param) IsDeprecated() bool {
|
|||
return p.Deprecated
|
||||
}
|
||||
|
||||
func (p *Param) IsAllInOne() bool {
|
||||
return p.AllInOne
|
||||
}
|
||||
|
||||
// yamlQuote quotes strings for yaml if they would otherwise by modified by the unmarshaler
|
||||
func (p *Param) yamlQuote(value string) string {
|
||||
if p.Type != TypeString {
|
||||
|
|
@ -301,15 +288,14 @@ func (c CountryCode) IsValid() bool {
|
|||
// TemplateDefinition contains properties of a device template
|
||||
type TemplateDefinition struct {
|
||||
Template string
|
||||
Deprecated bool `json:"-"`
|
||||
Auth map[string]any `json:",omitempty"` // OAuth parameters (if required)
|
||||
Group string `json:",omitempty"` // the group this template belongs to, references groupList entries
|
||||
Covers []string `json:",omitempty"` // list of covered outdated template names
|
||||
Products []Product `json:",omitempty"` // list of products this template is compatible with
|
||||
Capabilities []string `json:",omitempty"`
|
||||
Countries []CountryCode `json:",omitempty"` // list of countries supported by this template
|
||||
Requirements Requirements `json:",omitempty"`
|
||||
Linked []LinkedTemplate `json:",omitempty"` // list of templates that should be processed as part of the guided setup
|
||||
Params []Param `json:",omitempty"`
|
||||
Render string `json:"-"` // rendering template
|
||||
Deprecated bool `json:"-"`
|
||||
Auth map[string]any `json:",omitempty"` // OAuth parameters (if required)
|
||||
Group string `json:",omitempty"` // the group this template belongs to, references groupList entries
|
||||
Covers []string `json:",omitempty"` // list of covered outdated template names
|
||||
Products []Product `json:",omitempty"` // list of products this template is compatible with
|
||||
Capabilities []string `json:",omitempty"`
|
||||
Countries []CountryCode `json:",omitempty"` // list of countries supported by this template
|
||||
Requirements Requirements `json:",omitempty"`
|
||||
Params []Param `json:",omitempty"`
|
||||
Render string `json:"-"` // rendering template
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue