This commit is contained in:
J. Nick Koston 2023-06-09 16:00:00 -05:00
parent 8860cc28aa
commit aa26aefde3
No known key found for this signature in database
1 changed files with 3 additions and 3 deletions

View File

@ -15,8 +15,9 @@ namespace ratgdo {
void RATGDOSwitch::on_lock_state(LockState state) void RATGDOSwitch::on_lock_state(LockState state)
{ {
this->state(state == LockState::LOCK_STATE_LOCKED); bool value = state == LockState::LOCK_STATE_LOCKED;
this->publish_state(); this->state(value);
this->publish_state(value);
} }
void RATGDOSwitch::write_state(bool state) void RATGDOSwitch::write_state(bool state)
{ {
@ -26,7 +27,6 @@ namespace ratgdo {
} else { } else {
this->parent_->unlock(value); this->parent_->unlock(value);
} }
this->publish_state(value);
} }
} // namespace ratgdo } // namespace ratgdo