mirror of
https://github.com/beestat/app.git
synced 2025-07-09 03:04:07 -04:00
Removed magic numbers for temperature profile extreme padding
This commit is contained in:
parent
cb648389a2
commit
d5672b380d
@ -341,11 +341,11 @@ beestat.component.card.temperature_profiles.prototype.get_profile_extremes_ = fu
|
|||||||
|
|
||||||
extremes[parent_type].min = Math.min(
|
extremes[parent_type].min = Math.min(
|
||||||
extremes[parent_type].min,
|
extremes[parent_type].min,
|
||||||
Math.min.apply(null, Object.keys(profile.deltas)) - 5
|
Math.min.apply(null, Object.keys(profile.deltas)) - padding
|
||||||
);
|
);
|
||||||
extremes[parent_type].max = Math.max(
|
extremes[parent_type].max = Math.max(
|
||||||
extremes[parent_type].max,
|
extremes[parent_type].max,
|
||||||
Math.max.apply(null, Object.keys(profile.deltas)) + 5
|
Math.max.apply(null, Object.keys(profile.deltas)) + padding
|
||||||
);
|
);
|
||||||
|
|
||||||
// Extend to weather
|
// Extend to weather
|
||||||
@ -359,7 +359,7 @@ beestat.component.card.temperature_profiles.prototype.get_profile_extremes_ = fu
|
|||||||
) {
|
) {
|
||||||
extremes[parent_type].min = Math.min(
|
extremes[parent_type].min = Math.min(
|
||||||
extremes[parent_type].min,
|
extremes[parent_type].min,
|
||||||
thermostat.weather.temperature - 5
|
thermostat.weather.temperature - padding
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
@ -368,7 +368,7 @@ beestat.component.card.temperature_profiles.prototype.get_profile_extremes_ = fu
|
|||||||
) {
|
) {
|
||||||
extremes[parent_type].max = Math.max(
|
extremes[parent_type].max = Math.max(
|
||||||
extremes[parent_type].max,
|
extremes[parent_type].max,
|
||||||
thermostat.weather.temperature + 5
|
thermostat.weather.temperature + padding
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user