File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -237,7 +237,7 @@ export class PlotlyGraph extends HTMLElement {
237237 const validStatistic = STATISTIC_TYPES . includes ( entity . statistic ! ) ;
238238 if ( ! validStatistic ) entity . statistic = "mean" ;
239239 const validPeriod = STATISTIC_PERIODS . includes ( entity . period ) ;
240- if ( ( entity . period = "auto" ) ) {
240+ if ( entity . period === "auto" ) {
241241 entity . autoPeriod = true ;
242242 }
243243 if ( ! validPeriod ) entity . period = "hour" ;
@@ -307,7 +307,7 @@ export class PlotlyGraph extends HTMLElement {
307307 if ( ( entity as any ) . autoPeriod ) {
308308 if ( isEntityIdStatisticsConfig ( entity ) && entity . autoPeriod ) {
309309 const spanInMinutes = ( range [ 1 ] - range [ 0 ] ) / 1000 / 60 ;
310- const MIN_POINTS_PER_RANGE = 10 ;
310+ const MIN_POINTS_PER_RANGE = 500 ;
311311 const period2minutes : [ StatisticPeriod , number ] [ ] = [
312312 // needs to be sorted in ascending order
313313 [ "5minute" , 5 ] ,
You can’t perform that action at this time.
0 commit comments