v0.8.7
This commit is contained in:
+2
-11
@@ -87,12 +87,7 @@ function temporarySessionStatus(zone) {
|
||||
const safetyRemaining = secondsUntil(session.safety_expires_at);
|
||||
const hardRemaining = secondsUntil(session.expires_at);
|
||||
const startRemaining = secondsUntil(session.started_at);
|
||||
const legacyActive = !session.activated_at
|
||||
&& Number(session.generation ?? 0) === 0
|
||||
&& (session.start_kind || 'now') === 'now'
|
||||
&& zone.local_thermostat_power === true
|
||||
&& (!session.started_at || new Date(session.started_at).getTime() <= Date.now());
|
||||
const pending = !session.activated_at && !legacyActive;
|
||||
const pending = !session.activated_at;
|
||||
const target = Number(session.temperature_target ?? zone.effective_setpoint ?? zone.setpoint);
|
||||
const targetText = Number.isFinite(target) ? target.toFixed(1) : '--';
|
||||
const tolerance = Number(session.tolerance_c ?? 0.3).toFixed(1);
|
||||
@@ -1448,11 +1443,7 @@ function populateTemporaryThermostat(id) {
|
||||
form.start_at.value = dateTimeLocalValue(new Date(Date.now() + 60 * 60 * 1000));
|
||||
form.until.value = dateTimeLocalValue(new Date(Date.now() + 2 * 60 * 60 * 1000));
|
||||
const session = zone.temporary_quick_thermostat;
|
||||
const activeSession = !!session?.activated_at || (!!session
|
||||
&& Number(session.generation ?? 0) === 0
|
||||
&& (session.start_kind || 'now') === 'now'
|
||||
&& zone.local_thermostat_power === true
|
||||
&& (!session.started_at || new Date(session.started_at).getTime() <= Date.now()));
|
||||
const activeSession = !!session?.activated_at;
|
||||
form.dataset.activeSession = activeSession ? 'true' : 'false';
|
||||
if (session) {
|
||||
form.start_kind.value = session.start_kind || (new Date(session.started_at).getTime() > Date.now() ? 'at' : 'now');
|
||||
|
||||
Reference in New Issue
Block a user