send last poll instead of polling new
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user