File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -209,10 +209,10 @@ def is_weather_outdatet():
209209
210210@log_call_and_result
211211def is_smartfact_outdatet ():
212- ''' SMARTFACT not updated in the last 10 minutes '''
212+ ''' SMARTFACT not updated in the last 10 minutes or timestamp missing. '''
213213 timestamp = sfc .main_page ().timestamp_1
214214 if timestamp is None :
215- raise ValueError ( 'Could not get smartfact timestamp' )
215+ return True
216216 return is_older (timestamp , timedelta (minutes = 10 ))
217217
218218
@@ -252,11 +252,9 @@ def is_maximum_current_high():
252252
253253@log_call_and_result
254254def is_rel_camera_temperature_high ():
255- '''relative camera temperature > 15°C'''
255+ '''relative camera temperature > 15°C or not available. Camera off? '''
256256 relative_temperature = sfc .main_page ().relative_camera_temperature .value
257- if math .isnan (relative_temperature ):
258- raise ValueError ('Could not get relative camera temperature' )
259- return relative_temperature >= 15.0
257+ return math .isnan (relative_temperature ) or relative_temperature >= 15.0
260258
261259
262260@log_call_and_result
You can’t perform that action at this time.
0 commit comments