Weishaupt: fix reading SG ready mode (#18246)

This commit is contained in:
deadrabbit87 2025-01-23 12:53:25 +01:00 • committed by GitHub
parent 4adee73a88
commit 9127e1a913
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -18,20 +18,33 @@ 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 SG2 == 1: res = 2
}
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: