Skip to content

Commit

Permalink
Small fixes (#2071)
Browse files Browse the repository at this point in the history
* web: fix rfb node generator syntax, do not send as basic settings

* ha: allocate discovery object later
  • Loading branch information
mcspr authored Dec 18, 2019
1 parent 76ba6d5 commit 0f02256
Show file tree
Hide file tree
Showing 19 changed files with 8,737 additions and 8,739 deletions.
Binary file modified code/espurna/data/index.all.html.gz
Binary file not shown.
Binary file modified code/espurna/data/index.light.html.gz
Binary file not shown.
Binary file modified code/espurna/data/index.lightfox.html.gz
Binary file not shown.
Binary file modified code/espurna/data/index.rfbridge.html.gz
Binary file not shown.
Binary file modified code/espurna/data/index.rfm69.html.gz
Binary file not shown.
Binary file modified code/espurna/data/index.sensor.html.gz
Binary file not shown.
Binary file modified code/espurna/data/index.small.html.gz
Binary file not shown.
Binary file modified code/espurna/data/index.thermostat.html.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion code/espurna/homeassistant.ino
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ void haSetup() {

// On MQTT connect check if we have something to send
mqttRegister([](unsigned int type, const char * topic, const char * payload) {
if (type == MQTT_CONNECT_EVENT) _haSend();
if (type == MQTT_CONNECT_EVENT) schedule_function(_haSend);
if (type == MQTT_DISCONNECT_EVENT) _ha_send_flag = _ha_enabled;
});

Expand Down
6,078 changes: 3,039 additions & 3,039 deletions code/espurna/static/index.all.html.gz.h

Large diffs are not rendered by default.

1,222 changes: 611 additions & 611 deletions code/espurna/static/index.light.html.gz.h

Large diffs are not rendered by default.

520 changes: 260 additions & 260 deletions code/espurna/static/index.lightfox.html.gz.h

Large diffs are not rendered by default.

4,883 changes: 2,441 additions & 2,442 deletions code/espurna/static/index.rfbridge.html.gz.h

Large diffs are not rendered by default.

3,234 changes: 1,617 additions & 1,617 deletions code/espurna/static/index.rfm69.html.gz.h

Large diffs are not rendered by default.

526 changes: 263 additions & 263 deletions code/espurna/static/index.sensor.html.gz.h

Large diffs are not rendered by default.

499 changes: 250 additions & 249 deletions code/espurna/static/index.small.html.gz.h

Large diffs are not rendered by default.

501 changes: 251 additions & 250 deletions code/espurna/static/index.thermostat.html.gz.h

Large diffs are not rendered by default.

7 changes: 2 additions & 5 deletions code/html/custom.js
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ function initSelectGPIO(select) {
[13, "13 (MTCK)"],
[14, "14 (MTMS)"],
[15, "15 (MTDO)"],
[16, "15 (WAKE)"],
[16, "16 (WAKE)"],
];
for (n in mapping) {
var elem = $('<option value="' + mapping[n][0] + '">');
Expand Down Expand Up @@ -1449,12 +1449,9 @@ function addRfbNode() {

var template = $("#rfbNodeTemplate").children();
var line = $(template).clone();
var status = true;
$("span", line).html(numNodes);
$(line).find("input").each(function() {
$(this).data("id", numNodes);
$(this).attr("status", status ? 1 : 0);
status = !status;
this.dataset["id"] = numNodes;
});
$(line).find(".button-rfb-learn").on("click", rfbLearn);
$(line).find(".button-rfb-forget").on("click", rfbForget);
Expand Down
4 changes: 2 additions & 2 deletions code/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1789,15 +1789,15 @@ <h2>

<div class="pure-g">
<div class="pure-u-1 pure-u-lg-1-4"><label>Switch ON</label></div>
<input class="pure-u-1 pure-u-lg-1-3" type="text" maxlength="116" name="rfbcode" data-id="1" data-status="1" />
<input class="pure-u-1 pure-u-lg-1-3" type="text" maxlength="116" name="rfbcode" data-status="1" data-settings-ignore="true" />
<div class="pure-u-1-3 pure-u-lg-1-8"><button type="button" class="pure-u-23-24 pure-button button-rfb-learn">LEARN</button></div>
<div class="pure-u-1-3 pure-u-lg-1-8"><button type="button" class="pure-u-23-24 pure-button button-rfb-send">SAVE</button></div>
<div class="pure-u-1-3 pure-u-lg-1-8"><button type="button" class="pure-u-23-24 pure-button button-rfb-forget">FORGET</button></div>
</div>

<div class="pure-g">
<div class="pure-u-1 pure-u-lg-1-4"><label>Switch OFF</label></div>
<input class="pure-u-1 pure-u-lg-1-3" type="text" maxlength="116" name="rfbcode" data-id="1" data-status="0" />
<input class="pure-u-1 pure-u-lg-1-3" type="text" maxlength="116" name="rfbcode" data-status="0" data-settings-ignore="true" />
<div class="pure-u-1-3 pure-u-lg-1-8"><button type="button" class="pure-u-23-24 pure-button button-rfb-learn">LEARN</button></div>
<div class="pure-u-1-3 pure-u-lg-1-8"><button type="button" class="pure-u-23-24 pure-button button-rfb-send">SAVE</button></div>
<div class="pure-u-1-3 pure-u-lg-1-8"><button type="button" class="pure-u-23-24 pure-button button-rfb-forget">FORGET</button></div>
Expand Down

0 comments on commit 0f02256

Please sign in to comment.