send instrument='n_a' if not available

instead of null

+ remove another debugging print statement
This commit is contained in:
2025-04-30 14:48:01 +02:00
parent e51942c97f
commit 43624b4222
2 changed files with 1 additions and 2 deletions

View File

@ -73,7 +73,6 @@ class SecopInteractor(SecopClient):
component['info'] = info
component['name'] = f'{name}:value'
component['title'] = name
print(component)
components.append(component)
self.param_updates.add('value')
self.param_updates.add('status')

View File

@ -147,7 +147,7 @@ def get_update(_=None):
logging.info('UPDATE %s %s', client.id, socket.getfqdn(flask.request.remote_addr.split(':')[-1]))
# msg = dict(type='id', id=client.id, title=instrument.title);
# yield to_json_sse(msg)
msg = dict(type='id', id=client.id, instrument=kwargs.get('instrument', '<unknown>'),
msg = dict(type='id', id=client.id, instrument=kwargs.get('instrument') or 'n_a',
device=client.device_name)
yield to_json_sse(msg)
try: