mirror of
https://github.com/tomaae/homeassistant-mikrotik_router.git
synced 2025-06-27 11:18:55 +02:00
skip scripts without a name #3
This commit is contained in:
parent
3534215a48
commit
23b3e17e97
1 changed files with 4 additions and 1 deletions
|
@ -205,7 +205,7 @@ class MikrotikControllerData():
|
|||
self.data['interface'][uid] = {}
|
||||
|
||||
self.data['interface'][uid]['default-name'] = from_entry(entry, 'default-name')
|
||||
self.data['interface'][uid]['name'] = from_entry(entry, 'name', entry['default-name'])
|
||||
self.data['interface'][uid]['name'] = from_entry(entry, 'name', default=entry['default-name'])
|
||||
self.data['interface'][uid]['type'] = from_entry(entry, 'type', 'unknown')
|
||||
self.data['interface'][uid]['running'] = from_entry_bool(entry, 'running')
|
||||
self.data['interface'][uid]['enabled'] = from_entry_bool(entry, 'disabled', reverse=True)
|
||||
|
@ -450,6 +450,9 @@ class MikrotikControllerData():
|
|||
if 'name' not in entry:
|
||||
continue
|
||||
|
||||
if not entry['name']:
|
||||
continue
|
||||
|
||||
uid = entry['name']
|
||||
if uid not in self.data['script']:
|
||||
self.data['script'][uid] = {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue