async shutdown() {
        if (!this.client) {
            return;
        }

        //disable automatic reconnects
        this.client.options.reconnectPeriod = 0;

        this.stopAutorefreshService();

        await this.reconfigure(async () => {
            const deconfigOpts = {
                cleanHomie: this.currentConfig.interfaces.homie.cleanAttributesOnShutdown,
                cleanHass: this.currentConfig.interfaces.homeassistant.cleanAutoconfOnShutdown,
                unsubscribe: true
            };

            await this.robotHandle.deconfigure(deconfigOpts);

            if (this.currentConfig.interfaces.homeassistant.enabled) {
                await this.hassController.deconfigure(deconfigOpts);
            }

        }, {targetState: HomieCommonAttributes.STATE.DISCONNECTED});

        if (this.currentConfig.interfaces.homeassistant.enabled) {
            // Workaround to allow sharing one single LWT with both Homie consumers and HAss.
            // "lost" for Homie means that device disconnected uncleanly, however we also set it as hass's unavailable
            // payload.
            // Switching to "lost" temporarily shouldn't bother most Homie consumers, but it will ensure hass also knows
            // what's up.
            await this.setState(HomieCommonAttributes.STATE.LOST);
            await this.setState(HomieCommonAttributes.STATE.DISCONNECTED);
        }

        await this.disconnect();
    }
Shutdown MQTT Client

@returns {Promise<void>}