Skip to content

Commit

Permalink
fixed bug where a scheduler item to set dew heater power was not carr…
Browse files Browse the repository at this point in the history
…ied out
  • Loading branch information
YungKC committed Jan 12, 2025
1 parent 9b3c0bb commit c47c67d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion device/seestar_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -1431,7 +1431,8 @@ def start_up_thread_fn(self, params, is_from_schedule = False):
self.play_sound(82)

def action_set_dew_heater(self, params):
return self.send_message_param_sync({"method": "pi_output_set2", "params":{"heater":{"state":params['heater']> 0,"value":params['heater']}}})
response = self.send_message_param_sync({"method": "pi_output_set2", "params":{"heater":{"state":params['heater']> 0,"value":params['heater']}}})
return response

def action_start_up_sequence(self, params):
if self.schedule['state'] != "stopped" and self.schedule['state'] != "complete" :
Expand Down Expand Up @@ -2057,6 +2058,9 @@ def update_time():
while startup_thread.is_alive():
update_time()
time.sleep(2)
elif action == 'action_set_dew_heater':
self.logger.info(f"Trying to set dew heater to {cur_schedule_item['params']}")
self.action_set_dew_heater(cur_schedule_item['params'])
else:
if 'params' in cur_schedule_item:
request = {'method': action, 'params': cur_schedule_item['params']}
Expand Down

0 comments on commit c47c67d

Please sign in to comment.