Generic Commit; Most likely a fix or small feature

This commit is contained in:
Darius
2025-11-21 20:57:17 +01:00
parent 162d133eb7
commit e1ca9d8963

View File

@@ -21,10 +21,12 @@ export class HomeAssistantService extends BaseService<HomeAssistantClient> {
const position = positionResult.result as HomeAssistantDeskPositionResult;
if (position.as_boolean) {
throw Error("desk is already in standing position");
throw Error(
`desk is already in standing position and has been for ${position.last_changed.toReadable(true)}`,
);
}
if (position.last_changed.seconds < 120) {
if (position.last_changed.seconds < 300) {
throw Error("desk has moved too recently");
}
@@ -34,7 +36,7 @@ export class HomeAssistantService extends BaseService<HomeAssistantClient> {
return this.getSuccessfulResult(result);
} catch (error) {
const error_message = `error starting stand automation. ${error}`;
const error_message = `error starting stand automation. ${error instanceof Error ? error.message : error}`;
logWarning(error_message);
return this.getErrorResult(error_message);
}