Skip to content
This repository was archived by the owner on Sep 15, 2024. It is now read-only.

Commit e4232a7

Browse files
committed
fix for new MQTT client library changes
1 parent a61d0e9 commit e4232a7

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/server.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import mqtt, { IClientOptions } from 'mqtt';
1+
import mqtt, { IClientOptions, MqttClient } from 'mqtt';
22

33
import { ControllerInfo } from './models';
44
import { SmartDisplayController } from './smart-display-controller';
@@ -12,7 +12,7 @@ import { CityWeatherOwmApp as CityWeatherOwmApp } from './apps/city-weather-owm'
1212
import { CityWeatherHaApp as CityWeatherHaApp } from './apps/city-weather-ha';
1313

1414
export class Server {
15-
private readonly _client: mqtt.Client;
15+
private readonly _client: MqttClient;
1616
private readonly _apps: App[] = [];
1717
private readonly _controller: SmartDisplayController;
1818
private readonly _appIterations = parseInt(

src/smart-display-controller.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import mqtt from 'mqtt';
1+
import { MqttClient } from 'mqtt';
22
import Color from 'color';
33
import dayjs from 'dayjs';
44

@@ -36,7 +36,7 @@ export class SmartDisplayController {
3636
return diffSeconds > 300; // more than 5 minutes old
3737
}
3838

39-
constructor(private _client: mqtt.Client) {
39+
constructor(private _client: MqttClient) {
4040
_client
4141
.subscribe('smartDisplay/client/out/#')
4242
.on('message', (topic, message) => {

0 commit comments

Comments
 (0)