Keep trying posting

This commit is contained in:
Antonio J. Delgado 2025-01-06 23:28:33 +02:00
parent 5649bb2883
commit ba8753d345

View file

@ -70,7 +70,10 @@ class PublishActiveWindows:
entity_id = f'sensor.{hostname}_open_window' entity_id = f'sensor.{hostname}_open_window'
attributes['focus'] = 'False' attributes['focus'] = 'False'
if not self._publish_state(entity_id=entity_id, state=state, attributes=attributes): if not self._publish_state(entity_id=entity_id, state=state, attributes=attributes):
sys.exit(1) # sys.exit(1)
self._log.warning(
'Failed publishing the state but will continue trying'
)
time.sleep(self.config['update_frequency']) time.sleep(self.config['update_frequency'])
def _get_process_command_line(self, process_id): def _get_process_command_line(self, process_id):