Skip to content

Commit

Permalink
fix missing vaiable
Browse files Browse the repository at this point in the history
  • Loading branch information
hahahannes committed May 2, 2024
1 parent 2b91ee7 commit e6002f9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions algo/operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,18 +114,18 @@ def run(self, data, selector='energy_func', device_id=''):
value = float(data['value'])
util.logger.debug(f'{LOG_PREFIX}: Device: {device_id} Input time: {str(data["time"])} Value: {str(data["value"])}')

value = {
init_value = {
"type": False,
"sub_type": "",
"value": "",
"threshold": 0,
"mean": 0
}
if self.init_phase_handler.operator_is_in_init_phase(timestamp):
return self.init_phase_handler.generate_init_msg(timestamp, value)
return self.init_phase_handler.generate_init_msg(timestamp, init_value)

if self.init_phase_handler.init_phase_needs_to_be_reset():
return self.init_phase_handler.reset_init_phase(value)
return self.init_phase_handler.reset_init_phase(init_value)

device_detector = self.get_device_detectors(input_id)
anomalies_found = None
Expand Down

0 comments on commit e6002f9

Please sign in to comment.