emsesp: use single cached bulk fetch to avoid firmware rate limiting (#32559)
This commit is contained in:
parent
c0bb9a3fed
commit
12fd62f415
1 changed files with 32 additions and 30 deletions
|
|
@ -93,36 +93,36 @@ render: |
|
|||
type: sgready
|
||||
power:
|
||||
source: http
|
||||
uri: http://{{ .host }}/api/boiler/{{ .powersource }}
|
||||
jq: .value // 0
|
||||
uri: http://{{ .host }}/api/boiler
|
||||
cache: {{ .cache }}
|
||||
jq: .{{ .powersource }} // 0
|
||||
{{- if eq .powersource "hppower" }}
|
||||
scale: 1000
|
||||
{{- end}}
|
||||
getmode:
|
||||
source: cached
|
||||
cache: {{ .cache }}
|
||||
value:
|
||||
source: go
|
||||
script: |
|
||||
res := 2 // 0/0 Normal
|
||||
switch {
|
||||
case SG1 == "1" && SG4 == "0": res = 1 // 1/0 Frostschutz
|
||||
case SG4 == "1": res = 3 // x/1 Forcierter Betrieb/Sofortige Ansteuerung
|
||||
}
|
||||
res
|
||||
in:
|
||||
- name: SG1
|
||||
type: string
|
||||
config:
|
||||
source: http
|
||||
uri: http://{{ .host }}/api/boiler/{{ .sg1 }}
|
||||
jq: '.value[0:1]'
|
||||
- name: SG4
|
||||
type: string
|
||||
config:
|
||||
source: http
|
||||
uri: http://{{ .host }}/api/boiler/{{ .sg4 }}
|
||||
jq: '.value[0:1]'
|
||||
source: go
|
||||
script: |
|
||||
res := 2 // 0/0 Normal
|
||||
switch {
|
||||
case SG1 == "1" && SG4 == "0": res = 1 // 1/0 Frostschutz
|
||||
case SG4 == "1": res = 3 // x/1 Forcierter Betrieb/Sofortige Ansteuerung
|
||||
}
|
||||
res
|
||||
in:
|
||||
- name: SG1
|
||||
type: string
|
||||
config:
|
||||
source: http
|
||||
uri: http://{{ .host }}/api/boiler
|
||||
cache: {{ .cache }}
|
||||
jq: '.{{ .sg1 }}[0:1]'
|
||||
- name: SG4
|
||||
type: string
|
||||
config:
|
||||
source: http
|
||||
uri: http://{{ .host }}/api/boiler
|
||||
cache: {{ .cache }}
|
||||
jq: '.{{ .sg4 }}[0:1]'
|
||||
setmode:
|
||||
source: switch
|
||||
switch:
|
||||
|
|
@ -191,11 +191,13 @@ render: |
|
|||
{{- if .tempsource }}
|
||||
temp:
|
||||
source: http
|
||||
uri: http://{{ .host }}/api/boiler/dhw/curtemp
|
||||
jq: .value
|
||||
uri: http://{{ .host }}/api/boiler
|
||||
cache: {{ .cache }}
|
||||
jq: .dhw.curtemp
|
||||
limittemp:
|
||||
source: http
|
||||
uri: http://{{ .host }}/api/boiler/dhw/settemp
|
||||
jq: .value
|
||||
uri: http://{{ .host }}/api/boiler
|
||||
cache: {{ .cache }}
|
||||
jq: .dhw.settemp
|
||||
{{- end }}
|
||||
{{ include "heatpumpswitch" . }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue