mirror of
https://github.com/xoseperez/espurna.git
synced 2026-03-05 16:04:19 +01:00
* migrate to esbuild from terser, since now js source needs bundling * (temporary?) hijack inline-source object handling to inline html files * get rid of legacy removeIf comments in source in favour of explicit removal either through bundling tree-shaking and / or manual module-* class element removal w/ jsdom * get rid of multi-layered custom checkboxes in favour of `appearance: none` directly styling the `input` elem also removes scripting part that was supposed to adjust for=... labels * update to html-minifier-terser, up-to-date html-minifier fork * update to iro.js 5.5.x, using npm to manage dependencies * build script can now update resulting html output (called after bundling stage, before minification)
84 lines
3.7 KiB
HTML
84 lines
3.7 KiB
HTML
<form id="form-ha" class="pure-form pure-form-aligned form-settings">
|
|
<div class="panel" id="panel-ha">
|
|
|
|
<div class="header">
|
|
<h1>HOME ASSISTANT</h1>
|
|
<h2>
|
|
Automatically add this device to your Home Assistant though the MQTT discovery. <br><a href="https://www.home-assistant.io/docs/mqtt/discovery/">
|
|
Refer to the official documentation on how to enable it for the HA instance.
|
|
</a>
|
|
</h2>
|
|
</div>
|
|
|
|
<div class="page">
|
|
<fieldset>
|
|
|
|
<legend>Discovery</legend>
|
|
|
|
<div class="pure-control-group">
|
|
<label>Enabled</label>
|
|
<input class="checkbox-toggle" type="checkbox" name="haEnabled">
|
|
<span class="pure-form-message">
|
|
Publish discovery messages after establishing <strong>MQTT connection</strong> and when <strong>birth</strong> message is received.
|
|
</span>
|
|
</div>
|
|
|
|
</fieldset>
|
|
|
|
<fieldset>
|
|
<legend>MQTT</legend>
|
|
|
|
<div class="pure-control-group">
|
|
<label>Prefix</label>
|
|
<input name="haPrefix" type="text">
|
|
<span class="pure-form-message">
|
|
The prefix for the discovery topic e.g.
|
|
<code>
|
|
<strong><prefix></strong>/switch/espurna-123456/config
|
|
</code>
|
|
</span>
|
|
</div>
|
|
|
|
<div class="pure-control-group">
|
|
<label>Birth topic</label>
|
|
<input name="haBirthTopic" type="text">
|
|
</div>
|
|
|
|
<div class="pure-control-group">
|
|
<label>Birth payload</label>
|
|
<input name="haBirthPayload" type="text">
|
|
<span class="pure-form-message">
|
|
By default, Home Assistant sends 'online' and 'offline' to <code>homeassistant/status</code>. Instead of sending discovery message only when device makes MQTT connection, also publish it every time this <strong>topic</strong> receives the specified <strong>payload</strong>.<br>
|
|
<a href="https://www.home-assistant.io/integrations/mqtt/#birth-and-last-will-messages">See MQTT integration documentation for more information.</a>
|
|
</span>
|
|
</div>
|
|
|
|
<div class="pure-control-group">
|
|
<label>Retain</label>
|
|
<input class="checkbox-toggle" type="checkbox" name="haRetain">
|
|
<span class="pure-form-message">
|
|
Whether to set <strong>Retain</strong> flag on outgoing MQTT messages. When enabled, published discovery messages for the current state are be persisted by the broker and would be received by subscribers even when the device is offline.
|
|
</span>
|
|
</div>
|
|
|
|
</fieldset>
|
|
|
|
<fieldset>
|
|
<legend>Publish & Clear</legend>
|
|
<span class="pure-form-message">
|
|
Manually trigger discovery messages for the configured
|
|
<code>
|
|
<strong><prefix></strong>
|
|
</code>
|
|
</span>
|
|
<div class="pure-control-group">
|
|
<button type="button" class="pure-button button-ha-enabled pure-input-1">Publish</button>
|
|
<button type="button" class="pure-button button-ha-disabled pure-input-1">Clear</button>
|
|
</div>
|
|
</fieldset>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
</form>
|