Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getmode removed #18246

Merged
merged 7 commits into from
Jan 23, 2025
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 29 additions & 14 deletions templates/definition/charger/weishaupt-wpm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,35 @@ params:
render: |
type: sgready
getmode:
source: map
values:
8: 1 # ABTAUEN
10: 3 # EVU_SPERRE
14: 2 # ERHOEHTER_BETRIEB
18: 3 # FROSTSCHUTZ
19: 1 # HEIZBETRIEB
get:
source: modbus
{{- include "modbus" . | indent 4 }}
register:
address: 30006
type: input
encoding: uint16
source: go
script: |
res := 1
switch {
case SG1 == 1 && SG2 == 0: res = 3
case SG1 == 0 && SG2 == 0: res = 1
deadrabbit87 marked this conversation as resolved.
Show resolved Hide resolved
case SG1 == 0 && SG2 == 1: res = 2
case SG1 == 1 && SG2 == 1: res = 2
deadrabbit87 marked this conversation as resolved.
Show resolved Hide resolved
}
res
in:
- name: SG1
type: int
config:
source: modbus
{{- include "modbus" . | indent 6 }}
register:
address: 35101
type: input
encoding: uint16
- name: SG2
type: int
config:
source: modbus
{{- include "modbus" . | indent 6 }}
register:
address: 35102
type: input
encoding: uint16
setmode:
source: switch
switch:
Expand Down
Loading