Fix NeoPool NPFiltration switch result (#18871) (#18908)

This commit is contained in:
Norbert Richter 2023-06-19 22:53:51 +02:00 committed by GitHub
parent d5c727129e
commit 1f5c1baeae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 9 deletions

View File

@ -26,6 +26,7 @@ All notable changes to this project will be documented in this file.
- Matter fix local Occupancy sensor
- Zigbee fixed regression with SetOption101
- Berry fixed parser error with upvals in closures
- NeoPool fix NPFiltration switch result (#18871)
### Removed

View File

@ -2118,6 +2118,19 @@ void CmndNeopoolBit(void)
}
void CmndNeopoolFiltrationRes(uint16_t data)
{
uint16_t speed = NeoPoolGetFiltrationSpeed();
if (speed) {
Response_P(PSTR("{\"%s\":\"%s\",\"" D_NEOPOOL_JSON_FILTRATION_SPEED "\":\"%d\"}"),
XdrvMailbox.command,
GetStateText(data),
(speed < 3) ? speed : 3);
} else {
ResponseCmndStateText(data);
}
}
void CmndNeopoolFiltration(void)
{
uint16_t addr = MBF_PAR_FILT_MANUAL_STATE;
@ -2165,6 +2178,8 @@ void CmndNeopoolFiltration(void)
NeopoolResponseError();
return;
}
CmndNeopoolFiltrationRes(value[0]);
return;
} else {
NeopoolCmndError();
return;
@ -2174,15 +2189,7 @@ void CmndNeopoolFiltration(void)
NeopoolResponseError();
return;
}
uint16_t speed = NeoPoolGetFiltrationSpeed();
if (speed) {
Response_P(PSTR("{\"%s\":\"%s\",\"" D_NEOPOOL_JSON_FILTRATION_SPEED "\":\"%d\"}"),
XdrvMailbox.command,
GetStateText(data),
(speed < 3) ? speed : 3);
} else {
ResponseCmndStateText(data);
}
CmndNeopoolFiltrationRes(data);
}