mirror of
https://github.com/esphome/esphome.git
synced 2025-09-12 16:22:22 +01:00
follow logging guidelines
This commit is contained in:
@@ -128,7 +128,7 @@ void APIServer::schedule_reboot_timeout_() {
|
|||||||
this->status_set_warning();
|
this->status_set_warning();
|
||||||
this->set_timeout("api_reboot", this->reboot_timeout_, []() {
|
this->set_timeout("api_reboot", this->reboot_timeout_, []() {
|
||||||
if (!global_api_server->is_connected()) {
|
if (!global_api_server->is_connected()) {
|
||||||
ESP_LOGE(TAG, "No client connected; rebooting");
|
ESP_LOGE(TAG, "No clients; rebooting");
|
||||||
App.reboot();
|
App.reboot();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@@ -16,7 +16,7 @@ async def test_api_reboot_timeout(
|
|||||||
"""Test that the device reboots when no API clients connect within the timeout."""
|
"""Test that the device reboots when no API clients connect within the timeout."""
|
||||||
loop = asyncio.get_running_loop()
|
loop = asyncio.get_running_loop()
|
||||||
reboot_future = loop.create_future()
|
reboot_future = loop.create_future()
|
||||||
reboot_pattern = re.compile(r"No client connected; rebooting")
|
reboot_pattern = re.compile(r"No clients; rebooting")
|
||||||
|
|
||||||
def check_output(line: str) -> None:
|
def check_output(line: str) -> None:
|
||||||
"""Check output for reboot message."""
|
"""Check output for reboot message."""
|
||||||
|
Reference in New Issue
Block a user