1
0
mirror of https://github.com/home-assistant/frontend.git synced 2026-04-02 00:27:49 +01:00

Include QoS and retain in MQTT debug info (#5759)

This commit is contained in:
Erik Montnemery
2020-05-06 12:58:19 +02:00
committed by GitHub
parent c631554eb0
commit e5abb95f5c

View File

@@ -75,16 +75,15 @@ class MQTTMessages extends LitElement {
private _renderSingleMessage(message): TemplateResult {
const topic = message.topic;
return this._showTopic
? html`
<ul class="message-with-topic">
<li>Topic: <code>${topic}</code></li>
<li>
Payload: ${this._renderSinglePayload(message)}
</li>
</ul>
`
: this._renderSinglePayload(message);
return html`
<ul class="message-with-topic">
${this._showTopic ? html` <li>Topic: <code>${topic}</code></li> ` : ""}
<li>QoS: ${message.qos}${message.retain ? ", Retained" : ""}</li>
<li>
Payload: ${this._renderSinglePayload(message)}
</li>
</ul>
`;
}
private _renderSinglePayload(message): TemplateResult {