gh-6 Found coil for overpressure (3) by experimenting, fix HA status logic

This commit is contained in:
Jarno Rankinen 2023-02-23 20:42:00 +02:00
parent b1aa71e5c7
commit 1759dabbca
2 changed files with 3 additions and 4 deletions

View File

@ -1,7 +1,7 @@
0;COIL_STOP;Stop the machine
1;COIL_AWAY;Set the machine to away mode
2;COIL_AWAYL;Set the machine to away long mode
3;-;-
3;COIL_OVERPR;Set the machine to overpressure mode
4;-;-
5;-;-
6;COIL_MAX_H;Force the machine to heat at maximum effect.

1 0 COIL_STOP Stop the machine
2 1 COIL_AWAY Set the machine to away mode
3 2 COIL_AWAYL Set the machine to away long mode
4 3 - COIL_OVERPR - Set the machine to overpressure mode
5 4 - -
6 5 - -
7 6 COIL_MAX_H Force the machine to heat at maximum effect.

View File

@ -290,9 +290,8 @@ func (p *PingvinKL) populateStatus() {
func parseStatus(value int) string {
val := int16(value)
pingvinStatuses := []string{
"Normal",
"Max heating",
"Max cooling",
"Max heating",
"Stopped by alarm",
"Stopped by user",
"Away",
@ -308,7 +307,7 @@ func parseStatus(value int) string {
"Summer night cooling",
"HRC defrost",
}
for i := 1; i <= 16; i++ {
for i := 0; i < 15; i++ {
if val>>i&0x1 == 1 {
return pingvinStatuses[i]
}