Fix device not requesting Home Assistant time at the update interval (#6022)

This commit is contained in:
J. Nick Koston 2023-12-27 17:51:00 -10:00 committed by Jesse Hills
parent 41dc73d228
commit 48a4e6bae9
No known key found for this signature in database
GPG key ID: BEAAE804EFD8E83A

View file

@ -319,7 +319,7 @@ void APIServer::set_reboot_timeout(uint32_t reboot_timeout) { this->reboot_timeo
#ifdef USE_HOMEASSISTANT_TIME
void APIServer::request_time() {
for (auto &client : this->clients_) {
if (!client->remove_ && client->connection_state_ == APIConnection::ConnectionState::CONNECTED)
if (!client->remove_ && client->is_authenticated())
client->send_time_request();
}
}