Skip to content

Commit

Permalink
Bugfix to use numeric only device names (solves #176)
Browse files Browse the repository at this point in the history
  • Loading branch information
knowthelist committed Dec 21, 2016
1 parent eb643a2 commit 4a81199
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions www/tablet/js/fhem-tablet-ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,10 @@ var Modul_widget = function () {
function addReading(elem, key) {
var data = elem.data(key);
if (ftui.isValid(data)) {
data = data.toString();
if ($.isArray(data) || !data.match(/^[#\.\[].*/)) {
if ($.isArray(data) || !data.toString().match(/^[#\.\[].*/)) {
var device = elem.data('device');
if (!$.isArray(data)) {
data = new Array(data);
data = new Array(data.toString());
}
for (var i = 0, len = data.length; i < len; i++) {
var reading = data[i];
Expand Down
Loading

0 comments on commit 4a81199

Please sign in to comment.