Fix switch log state if inverted (#2960)

This commit is contained in:
Sebastian Raff 2021-12-30 04:05:31 +01:00 committed by GitHub
parent f859b346a6
commit 2cf36bdb46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -34,7 +34,7 @@ void Switch::publish_state(bool state) {
this->state = state != this->inverted_;
this->rtc_.save(&this->state);
ESP_LOGD(TAG, "'%s': Sending state %s", this->name_.c_str(), ONOFF(state));
ESP_LOGD(TAG, "'%s': Sending state %s", this->name_.c_str(), ONOFF(this->state));
this->state_callback_.call(this->state);
}
bool Switch::assumed_state() { return false; }