test
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import {
|
||||
StatusComponent,
|
||||
type ComponentUpdate,
|
||||
type GristRecord_PersonalGoals,
|
||||
type HA_Update,
|
||||
type HomeAssistantEntity,
|
||||
type TidalGetCurrent,
|
||||
type ComponentUpdate,
|
||||
type GristRecord_PersonalGoals,
|
||||
type HA_Update,
|
||||
type HomeAssistantEntity,
|
||||
StatusComponent,
|
||||
type TidalGetCurrent,
|
||||
} from "@dpu/shared";
|
||||
import type { FastifyInstance, FastifyReply } from "fastify";
|
||||
import type { FastifyRequest } from "fastify/types/request.js";
|
||||
|
||||
@@ -73,19 +73,14 @@ export class HomepageService extends BaseService<null> {
|
||||
|
||||
async sendFullInformationToSocket(socket: WebSocket): Promise<void> {
|
||||
try {
|
||||
const [desk, temp, tidal, personal_goals] = await this._getAll();
|
||||
const updates: ComponentUpdate[] = [
|
||||
createComponentUpdate(
|
||||
StatusComponent.HA_DESK_POSITION,
|
||||
this.lastPoll.ha_desk_position,
|
||||
),
|
||||
createComponentUpdate(StatusComponent.HA_TEMP, this.lastPoll.ha_temp),
|
||||
createComponentUpdate(
|
||||
StatusComponent.TIDAL_CURRENT,
|
||||
this.lastPoll.tidal_current,
|
||||
),
|
||||
createComponentUpdate(StatusComponent.HA_DESK_POSITION, desk),
|
||||
createComponentUpdate(StatusComponent.HA_TEMP, temp),
|
||||
createComponentUpdate(StatusComponent.TIDAL_CURRENT, tidal),
|
||||
createComponentUpdate(
|
||||
StatusComponent.GRIST_PERSONAL_GOALS,
|
||||
this.lastPoll.grist_personal_goals,
|
||||
personal_goals,
|
||||
),
|
||||
];
|
||||
socket.send(
|
||||
|
||||
@@ -154,7 +154,6 @@ const hpService = new HomepageService(
|
||||
wsService,
|
||||
);
|
||||
|
||||
await hpService.getFullInformation();
|
||||
hpService.scheduleMidnightGristUpdate();
|
||||
|
||||
async function verifyAPIKey(
|
||||
|
||||
Reference in New Issue
Block a user