File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -512,22 +512,22 @@ def stats():
512
512
logger .error ("Custom sensor class " + str (custom_stat ) + " not found in sensors_custom.py" )
513
513
return
514
514
515
- if not string_value :
515
+ if string_value is None :
516
516
string_value = str (numeric_value )
517
517
518
518
# Display text
519
519
theme_data = config .THEME_DATA ['STATS' ]['CUSTOM' ][custom_stat ].get ("TEXT" , None )
520
- if theme_data and string_value :
520
+ if theme_data and string_value is not None :
521
521
display_themed_value (theme_data = theme_data , value = string_value )
522
522
523
523
# Display graph from numeric value
524
524
theme_data = config .THEME_DATA ['STATS' ]['CUSTOM' ][custom_stat ].get ("GRAPH" , None )
525
- if theme_data and numeric_value :
525
+ if theme_data and numeric_value is not None :
526
526
display_themed_progress_bar (theme_data = theme_data , value = numeric_value )
527
527
528
528
# Display radial from numeric and text value
529
529
theme_data = config .THEME_DATA ['STATS' ]['CUSTOM' ][custom_stat ].get ("RADIAL" , None )
530
- if theme_data and numeric_value and string_value :
530
+ if theme_data and numeric_value is not None and string_value is not None :
531
531
display_themed_radial_bar (
532
532
theme_data = theme_data ,
533
533
value = numeric_value ,
You can’t perform that action at this time.
0 commit comments