send last poll instead of polling new

This commit is contained in:
Darius
2026-02-10 09:43:04 +01:00
parent 772a54aca8
commit b938068b61

View File

@@ -73,14 +73,19 @@ 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, desk),
createComponentUpdate(StatusComponent.HA_TEMP, temp),
createComponentUpdate(StatusComponent.TIDAL_CURRENT, tidal),
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.GRIST_PERSONAL_GOALS,
personal_goals,
this.lastPoll.grist_personal_goals,
),
];
socket.send(