1
0
mirror of https://github.com/beestat/app.git synced 2025-05-31 12:16:39 -04:00

Resolved some lint errors

This commit is contained in:
Jon Ziebell 2019-07-25 22:38:54 -04:00
parent b0da83bc2b
commit 81928fbf0c

View File

@ -73,7 +73,9 @@ beestat.component.card.system.prototype.decorate_circle_ = function(parent) {
.set_size(24) .set_size(24)
).render(humidity_container); ).render(humidity_container);
humidity_container.appendChild($.createElement('span').innerHTML(thermostat.humidity + '%')); humidity_container.appendChild(
$.createElement('span').innerHTML(thermostat.humidity + '%')
);
}; };
/** /**
@ -143,11 +145,11 @@ beestat.component.card.system.prototype.decorate_equipment_ = function(parent) {
running_equipment.push('aux_1'); running_equipment.push('aux_1');
} }
var render_icon = function(parent, icon, color, text) { var render_icon = function(icon_parent, icon, color, text) {
(new beestat.component.icon(icon) (new beestat.component.icon(icon)
.set_size(24) .set_size(24)
.set_color(color) .set_color(color)
).render(parent); ).render(icon_parent);
if (text !== undefined) { if (text !== undefined) {
var sub = $.createElement('sub') var sub = $.createElement('sub')
@ -157,10 +159,11 @@ beestat.component.card.system.prototype.decorate_equipment_ = function(parent) {
'color': color 'color': color
}) })
.innerHTML(text); .innerHTML(text);
parent.appendChild(sub); icon_parent.appendChild(sub);
} else { } else {
// A little spacer to help things look less uneven. // A little spacer to help things look less uneven.
parent.appendChild($.createElement('span').style('margin-right', beestat.style.size.gutter / 4)); icon_parent.appendChild($.createElement('span')
.style('margin-right', beestat.style.size.gutter / 4));
} }
}; };
@ -228,7 +231,9 @@ beestat.component.card.system.prototype.decorate_climate_ = function(parent) {
thermostat.ecobee_thermostat_id thermostat.ecobee_thermostat_id
]; ];
var climate = beestat.get_climate(ecobee_thermostat.json_program.currentClimateRef); var climate = beestat.get_climate(
ecobee_thermostat.json_program.currentClimateRef
);
var climate_container = $.createElement('div') var climate_container = $.createElement('div')
.style({ .style({
@ -295,7 +300,7 @@ beestat.component.card.system.prototype.decorate_top_right_ = function(parent) {
/** /**
* Get the title of the card. * Get the title of the card.
* *
* @return {string} * @return {string} The title of the card.
*/ */
beestat.component.card.system.prototype.get_title_ = function() { beestat.component.card.system.prototype.get_title_ = function() {
var thermostat = beestat.cache.thermostat[beestat.setting('thermostat_id')]; var thermostat = beestat.cache.thermostat[beestat.setting('thermostat_id')];
@ -306,7 +311,7 @@ beestat.component.card.system.prototype.get_title_ = function() {
/** /**
* Get the subtitle of the card. * Get the subtitle of the card.
* *
* @return {string} * @return {string} The subtitle of the card.
*/ */
beestat.component.card.system.prototype.get_subtitle_ = function() { beestat.component.card.system.prototype.get_subtitle_ = function() {
var thermostat = beestat.cache.thermostat[beestat.setting('thermostat_id')]; var thermostat = beestat.cache.thermostat[beestat.setting('thermostat_id')];
@ -315,7 +320,9 @@ beestat.component.card.system.prototype.get_subtitle_ = function() {
thermostat.ecobee_thermostat_id thermostat.ecobee_thermostat_id
]; ];
var climate = beestat.get_climate(ecobee_thermostat.json_program.currentClimateRef); var climate = beestat.get_climate(
ecobee_thermostat.json_program.currentClimateRef
);
// Is the temperature overridden? // Is the temperature overridden?
var override = ( var override = (
@ -349,10 +356,10 @@ beestat.component.card.system.prototype.get_subtitle_ = function() {
var hvac_mode = hvac_modes[ecobee_thermostat.json_settings.hvacMode]; var hvac_mode = hvac_modes[ecobee_thermostat.json_settings.hvacMode];
var heat = beestat.temperature({ heat = beestat.temperature({
'temperature': heat 'temperature': heat
}); });
var cool = beestat.temperature({ cool = beestat.temperature({
'temperature': cool 'temperature': cool
}); });