mirror of
https://github.com/ratgdo/esphome-ratgdo.git
synced 2025-02-09 17:23:39 +00:00
Some updates
This commit is contained in:
parent
15f5eab643
commit
ca16559ee6
@ -278,7 +278,6 @@ namespace secplus1 {
|
||||
|
||||
this->door_state = door_state;
|
||||
this->ratgdo_->received(door_state);
|
||||
this->ratgdo_->received(ButtonState::RELEASED);
|
||||
}
|
||||
else if (cmd.type == CommandType::DOOR_STATUS_0x37) {
|
||||
this->is_0x37_panel_ = true;
|
||||
@ -308,18 +307,20 @@ namespace secplus1 {
|
||||
ObstructionState obstruction_state = cmd.value == 0 ? ObstructionState::CLEAR : ObstructionState::OBSTRUCTED;
|
||||
this->ratgdo_->received(obstruction_state);
|
||||
}
|
||||
else if (cmd.type == CommandType::TOGGLE_DOOR_COMMIT) {
|
||||
else if (cmd.type == CommandType::TOGGLE_DOOR_RELEASE) {
|
||||
if (cmd.value == 0x31) {
|
||||
this->wall_panel_starting_ = true;
|
||||
}
|
||||
} else if (cmd.type == CommandType::TOGGLE_LIGHT_REQ) {
|
||||
} else if (cmd.type == CommandType::TOGGLE_LIGHT_PRESS) {
|
||||
// motion was detected, or the light toggle button was pressed
|
||||
// either way it's ok to trigger motion detection
|
||||
if (this->light_state == LightState::OFF) {
|
||||
this->ratgdo_->received(MotionState::DETECTED);
|
||||
}
|
||||
} else if (cmd.type == CommandType::TOGGLE_DOOR_REQ) {
|
||||
} else if (cmd.type == CommandType::TOGGLE_DOOR_PRESS) {
|
||||
this->ratgdo_->received(ButtonState::PRESSED);
|
||||
} else if (cmd.type == CommandType::TOGGLE_DOOR_RELEASE) {
|
||||
this->ratgdo_->received(ButtonState::RELEASED);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -31,12 +31,12 @@ namespace secplus1 {
|
||||
static const uint8_t secplus1_states[] = {0x35,0x35,0x35,0x35,0x33,0x33,0x53,0x53,0x38,0x3A,0x3A,0x3A,0x39,0x38,0x3A, 0x38,0x3A,0x39,0x3A};
|
||||
|
||||
ENUM(CommandType, uint16_t,
|
||||
(TOGGLE_DOOR_REQ, 0x30),
|
||||
(TOGGLE_DOOR_COMMIT, 0x31),
|
||||
(TOGGLE_LIGHT_REQ, 0x32),
|
||||
(TOGGLE_LIGHT_COMMIT, 0x33),
|
||||
(TOGGLE_LOCK_REQ, 0x34),
|
||||
(TOGGLE_LOCK_COMMIT, 0x35),
|
||||
(TOGGLE_DOOR_PRESS, 0x30),
|
||||
(TOGGLE_DOOR_RELEASE, 0x31),
|
||||
(TOGGLE_LIGHT_PRESS, 0x32),
|
||||
(TOGGLE_LIGHT_RELEASE, 0x33),
|
||||
(TOGGLE_LOCK_PRESS, 0x34),
|
||||
(TOGGLE_LOCK_RELEASE, 0x35),
|
||||
(DOOR_STATUS_0x37, 0x37),
|
||||
(DOOR_STATUS, 0x38),
|
||||
(OBSTRUCTION, 0x39),
|
||||
|
Loading…
x
Reference in New Issue
Block a user