From d5672b380d177157222b024210a2e3bb25393920 Mon Sep 17 00:00:00 2001 From: Jon Ziebell Date: Fri, 27 Jan 2023 07:59:12 -0500 Subject: [PATCH] Removed magic numbers for temperature profile extreme padding --- js/component/card/temperature_profiles.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/js/component/card/temperature_profiles.js b/js/component/card/temperature_profiles.js index 02ca449..39ef59d 100644 --- a/js/component/card/temperature_profiles.js +++ b/js/component/card/temperature_profiles.js @@ -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.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.apply(null, Object.keys(profile.deltas)) + 5 + Math.max.apply(null, Object.keys(profile.deltas)) + padding ); // 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, - thermostat.weather.temperature - 5 + thermostat.weather.temperature - padding ); } 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, - thermostat.weather.temperature + 5 + thermostat.weather.temperature + padding ); } }