1
0
mirror of https://github.com/beestat/app.git synced 2026-05-27 09:32:35 -04:00

Added rudimentary support for legacy monitor and control sensors (temperature only)

This commit is contained in:
Jon Ziebell
2021-12-14 23:00:43 -05:00
parent 06073bfc25
commit bcb59df01d
4 changed files with 80 additions and 6 deletions
+12 -6
View File
@@ -132,12 +132,18 @@ beestat.component.card.sensors.prototype.decorate_sensor_ = function(parent, sen
.render(td_above_below);
}
if (sensor.occupancy === true) {
(new beestat.component.icon('eye', 'Occupied')).render(td_icons);
} else {
(new beestat.component.icon('eye_off', 'Unoccupied'))
.set_color(beestat.style.color.bluegray.light)
.render(td_icons);
if (
sensor.type !== 'monitor_sensor' &&
sensor.type !== 'control_sensor'
) {
// Occupancy is not supported for these legacy sensor types.
if (sensor.occupancy === true) {
(new beestat.component.icon('eye', 'Occupied')).render(td_icons);
} else {
(new beestat.component.icon('eye_off', 'Unoccupied'))
.set_color(beestat.style.color.bluegray.light)
.render(td_icons);
}
}
td_icons.appendChild($.createElement('span').style({