diff --git a/src/panels/config/integrations/integration-panels/mqtt/mqtt-config-panel.ts b/src/panels/config/integrations/integration-panels/mqtt/mqtt-config-panel.ts index fd425047ae..6ff2efad38 100644 --- a/src/panels/config/integrations/integration-panels/mqtt/mqtt-config-panel.ts +++ b/src/panels/config/integrations/integration-panels/mqtt/mqtt-config-panel.ts @@ -14,6 +14,9 @@ import "../../../../../layouts/hass-subpage"; import { haStyle } from "../../../../../resources/styles"; import type { HomeAssistant } from "../../../../../types"; import "./mqtt-subscribe-card"; +import type { Action } from "../../../../../data/script"; +import { callExecuteScript } from "../../../../../data/service"; +import { showToast } from "../../../../../util/toast"; const qosLevel = ["0", "1", "2"]; @@ -55,14 +58,6 @@ export class MQTTConfigPanel extends LitElement { }) private _retain = false; - @state() - @storage({ - key: "panel-dev-mqtt-allow-template-ls", - state: true, - subscribe: false, - }) - private _allowTemplate = false; - protected render(): TemplateResult { return html` @@ -108,25 +103,7 @@ export class MQTTConfigPanel extends LitElement { > -

- - - -

-

- ${this._allowTemplate - ? this.hass.localize("ui.panel.config.mqtt.payload") - : this.hass.localize( - "ui.panel.config.mqtt.payload_no_template" - )} -

+

${this.hass.localize("ui.panel.config.mqtt.payload")}

+ showToast(this, { + message: err.message, + }) + ); } private async _openOptionFlow() { diff --git a/src/panels/config/integrations/integration-panels/mqtt/mqtt-subscribe-card.ts b/src/panels/config/integrations/integration-panels/mqtt/mqtt-subscribe-card.ts index 55e6382f31..489245fd41 100644 --- a/src/panels/config/integrations/integration-panels/mqtt/mqtt-subscribe-card.ts +++ b/src/panels/config/integrations/integration-panels/mqtt/mqtt-subscribe-card.ts @@ -105,7 +105,6 @@ class MqttSubscribeCard extends LitElement { size="small" .disabled=${this._topic === ""} @click=${this._handleSubmit} - type="submit" > ${this._subscribed ? this.hass.localize("ui.panel.config.mqtt.stop_listening") diff --git a/src/translations/en.json b/src/translations/en.json index 0466c4eb01..15ca72cccf 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -5633,8 +5633,6 @@ "description_publish": "Publish a packet", "topic": "Topic", "payload": "Payload (template allowed)", - "payload_no_template": "Payload", - "allow_template": "Allow template", "publish": "Publish", "description_listen": "Listen to a topic", "json_formatting": "Format JSON content",