add seconds to standing/sitting time
This commit is contained in:
4
package-lock.json
generated
4
package-lock.json
generated
@@ -26,8 +26,8 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@dpu/shared": {
|
||||
"version": "1.6.2",
|
||||
"resolved": "git+https://git.dariusbag.dev/DarDarBinks/dpu-shared.git#ceadd4e5a2db3e94234a455d66338fb94fccea40",
|
||||
"version": "1.6.4",
|
||||
"resolved": "git+https://git.dariusbag.dev/DarDarBinks/dpu-shared.git#60bcd23f5b77034777a792bbe8f33a62e92ba246",
|
||||
"dependencies": {
|
||||
"axios": "^1.7.9",
|
||||
"chalk": "^5.6.2",
|
||||
|
||||
@@ -27,6 +27,7 @@ export async function homeAssistantRoutes(
|
||||
position: z.string(),
|
||||
is_standing: z.boolean(),
|
||||
last_changed: z.string(),
|
||||
last_changed_seconds: z.number(),
|
||||
}),
|
||||
418: z.object({
|
||||
error: z.string(),
|
||||
@@ -42,7 +43,9 @@ export async function homeAssistantRoutes(
|
||||
return { error: service_result.result };
|
||||
}
|
||||
|
||||
return haService.convertPosResultToApiAnswer(service_result.result as HomeAssistantDeskPositionResult);
|
||||
return haService.convertPosResultToApiAnswer(
|
||||
service_result.result as HomeAssistantDeskPositionResult,
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
|
||||
@@ -82,6 +82,7 @@ export class HomeAssistantService extends BaseService<HomeAssistantClient> {
|
||||
position: position.as_text(),
|
||||
is_standing: position.as_boolean,
|
||||
last_changed: position.last_changed.toReadable(true),
|
||||
last_changed_seconds: position.last_changed.seconds,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user