Webserver utilize Component Iterator to not overload eventstream (#3310)

This commit is contained in:
Jesse Hills
2022-03-23 09:45:05 +13:00
parent 24b75b7ed6
commit 0729ed538e
13 changed files with 217 additions and 134 deletions
+1 -2
View File
@@ -50,8 +50,7 @@ bool InitialStateIterator::on_select(select::Select *select) {
#ifdef USE_LOCK
bool InitialStateIterator::on_lock(lock::Lock *a_lock) { return this->client_->send_lock_state(a_lock, a_lock->state); }
#endif
InitialStateIterator::InitialStateIterator(APIServer *server, APIConnection *client)
: ComponentIterator(server), client_(client) {}
InitialStateIterator::InitialStateIterator(APIConnection *client) : client_(client) {}
} // namespace api
} // namespace esphome