diff --git a/src/coordinator/helpers/inverterController.ts b/src/coordinator/helpers/inverterController.ts index c821b7a..b58c38b 100644 --- a/src/coordinator/helpers/inverterController.ts +++ b/src/coordinator/helpers/inverterController.ts @@ -70,7 +70,7 @@ const defaultValues = { } as const satisfies Record; export class InverterController { - private activeLimitOutput: Publish; + private publish: Publish; private cachedDerSample = new CappedArrayStack({ limit: 100 }); private cachedSiteSample = new CappedArrayStack({ limit: 100 }); private logger: Logger; @@ -107,7 +107,7 @@ export class InverterController { inverterConfiguration: InverterConfiguration, ) => Promise; }) { - this.activeLimitOutput = new Publish({ config }); + this.publish = new Publish({ config }); this.secondsToSample = config.inverterControl.sampleSeconds; this.controlFrequencyMinimumSeconds = config.inverterControl.controlFrequencyMinimumSeconds; @@ -175,7 +175,7 @@ export class InverterController { writeActiveControlLimit({ limit: activeInverterControlLimit }); - this.activeLimitOutput.onActiveInverterControlLimit({ + this.publish.onActiveInverterControlLimit({ limit: activeInverterControlLimit, }); diff --git a/src/coordinator/helpers/publish.ts b/src/coordinator/helpers/publish.ts index f4134fe..9dfeeb0 100644 --- a/src/coordinator/helpers/publish.ts +++ b/src/coordinator/helpers/publish.ts @@ -5,7 +5,7 @@ import { type ActiveInverterControlLimit } from './inverterController.js'; export class Publish { private mqtt: { client: mqtt.MqttClient; topic: string } | undefined; - constructor({ config }: { config: Config }) { + constructor({ config }: { config: Pick }) { if (config.publish?.mqtt) { this.mqtt = { client: mqtt.connect(config.publish.mqtt.host, {