mirror of
https://github.com/ratgdo/esphome-ratgdo.git
synced 2025-03-03 12:29:54 +00:00
cleanup
This commit is contained in:
parent
ffb35c2f82
commit
6700a7d0c5
@ -538,6 +538,7 @@ namespace ratgdo {
|
|||||||
{
|
{
|
||||||
if (this->store_.doorState == DoorState::DOOR_STATE_OPEN || this->store_.doorState == DoorState::DOOR_STATE_OPENING) {
|
if (this->store_.doorState == DoorState::DOOR_STATE_OPEN || this->store_.doorState == DoorState::DOOR_STATE_OPENING) {
|
||||||
ESP_LOGD(TAG, "The door is already %s", door_state_to_string(static_cast<DoorState>(this->store_.doorState)));
|
ESP_LOGD(TAG, "The door is already %s", door_state_to_string(static_cast<DoorState>(this->store_.doorState)));
|
||||||
|
sendDoorStatus();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
toggleDoor();
|
toggleDoor();
|
||||||
@ -547,6 +548,7 @@ namespace ratgdo {
|
|||||||
{
|
{
|
||||||
if (this->store_.doorState == DoorState::DOOR_STATE_CLOSED || this->store_.doorState == DoorState::DOOR_STATE_CLOSING) {
|
if (this->store_.doorState == DoorState::DOOR_STATE_CLOSED || this->store_.doorState == DoorState::DOOR_STATE_CLOSING) {
|
||||||
ESP_LOGD(TAG, "The door is already %s", door_state_to_string(static_cast<DoorState>(this->store_.doorState)));
|
ESP_LOGD(TAG, "The door is already %s", door_state_to_string(static_cast<DoorState>(this->store_.doorState)));
|
||||||
|
sendDoorStatus();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
toggleDoor();
|
toggleDoor();
|
||||||
@ -558,6 +560,7 @@ namespace ratgdo {
|
|||||||
toggleDoor();
|
toggleDoor();
|
||||||
} else {
|
} else {
|
||||||
ESP_LOGD(TAG, "The door is not moving.");
|
ESP_LOGD(TAG, "The door is not moving.");
|
||||||
|
sendDoorStatus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -572,6 +575,7 @@ namespace ratgdo {
|
|||||||
{
|
{
|
||||||
if (this->store_.lightState == LightState::LIGHT_STATE_ON) {
|
if (this->store_.lightState == LightState::LIGHT_STATE_ON) {
|
||||||
ESP_LOGD(TAG, "already on");
|
ESP_LOGD(TAG, "already on");
|
||||||
|
sendLightStatus();
|
||||||
} else {
|
} else {
|
||||||
toggleLight();
|
toggleLight();
|
||||||
}
|
}
|
||||||
@ -581,6 +585,7 @@ namespace ratgdo {
|
|||||||
{
|
{
|
||||||
if (this->store_.lightState == LightState::LIGHT_STATE_OFF) {
|
if (this->store_.lightState == LightState::LIGHT_STATE_OFF) {
|
||||||
ESP_LOGD(TAG, "already off");
|
ESP_LOGD(TAG, "already off");
|
||||||
|
sendLightStatus();
|
||||||
} else {
|
} else {
|
||||||
toggleLight();
|
toggleLight();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user