You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
561 B
23 lines
561 B
7 years ago
|
import { MqttApiClient } from "@app/mqtt";
|
||
|
import { Message, UiStore } from "@app/ui";
|
||
|
import { ISprinklersApi, SprinklersDevice } from "@common/sprinklers";
|
||
|
|
||
|
export class State {
|
||
|
client: ISprinklersApi = new MqttApiClient();
|
||
|
device: SprinklersDevice;
|
||
|
uiStore = new UiStore();
|
||
|
|
||
|
constructor() {
|
||
|
const device = this.client.getDevice("grinklers");
|
||
|
this.uiStore.addMessage({ header: "asdf", content: "boo!", error: true });
|
||
|
}
|
||
|
|
||
|
start() {
|
||
|
this.client.start();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
const state = new State();
|
||
|
|
||
|
export default state;
|