1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-03 03:42:20 +01:00

Add support for doing update entity refresh/check via API. (#7190)

This commit is contained in:
Jesse Hills
2024-08-05 16:58:20 +12:00
committed by GitHub
parent 38c25dec93
commit 87944f0c1b
6 changed files with 43 additions and 8 deletions

View File

@@ -1328,7 +1328,17 @@ void APIConnection::update_command(const UpdateCommandRequest &msg) {
if (update == nullptr)
return;
update->perform();
switch (msg.command) {
case enums::UPDATE_COMMAND_UPDATE:
update->perform();
break;
case enums::UPDATE_COMMAND_CHECK:
update->check();
break;
default:
ESP_LOGW(TAG, "Unknown update command: %d", msg.command);
break;
}
}
#endif