conf_command['down filter'] = down_filter
json_command = json.dumps(conf_command)
await websocket.send(json_command)
- print(f"WSClient '{self.name}': Connection configured"
- f" to {self.conf['url']} as '{conf_command['name']}'.")
+ if 'name' in conf_command:
+ print(f"WSClient '{self.name}': Connection configured"
+ f" to {self.conf['url']}"
+ f" as '{conf_command['name']}'.")
+ else:
+ print(f"WSClient '{self.name}': Connection configured"
+ f" to {self.conf['url']}.")
await self.bus.send(Message(self.name,
{'event':
'connection configured'}))