async refresh(component, topics) {
        const base = component.getBaseTopic();

        for (const [topic, payload] of Object.entries(topics)) {
            await this.controller.publishHass(
                topic === "" ? base : base + "/" + topic,
                // @ts-ignore
                (payload instanceof String || payload instanceof Buffer) ? payload : JSON.stringify(payload),
                {qos: this.qos, retain: true}
            );
        }
    }
Refresh component's managed topics. This method is used by components internally, it shouldn't be called
externally.

@package
@param {import("./components/HassComponent")} component
@param {object} topics
@return {Promise<void>}