mirror of
https://github.com/rstrouse/ESPSomfy-RTS.git
synced 2025-12-13 11:02:12 +01:00
Somfy: add Sun status command
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
This commit is contained in:
parent
f632dc9c54
commit
8ed5346992
2 changed files with 14 additions and 2 deletions
|
|
@ -91,6 +91,8 @@ String translateSomfyCommand(const somfy_commands cmd) {
|
|||
return "Step Up";
|
||||
case somfy_commands::StepDown:
|
||||
return "Step Down";
|
||||
case somfy_commands::Status:
|
||||
return "Status";
|
||||
default:
|
||||
return "Unknown(" + String((uint8_t)cmd) + ")";
|
||||
}
|
||||
|
|
@ -173,9 +175,12 @@ void somfy_frame_t::decodeFrame(byte* frame) {
|
|||
case somfy_commands::SunFlag:
|
||||
case somfy_commands::Flag:
|
||||
break;
|
||||
case somfy_commands::Status:
|
||||
this->rollingCode = 0;
|
||||
this->sun = !!(decoded[3] & STATUS_SUN);
|
||||
break;
|
||||
case somfy_commands::UnknownC:
|
||||
case somfy_commands::UnknownD:
|
||||
case somfy_commands::UnknownE:
|
||||
case somfy_commands::RTWProto:
|
||||
this->valid = false;
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue