mirror of
https://github.com/tomaae/homeassistant-mikrotik_router.git
synced 2025-06-23 01:08:55 +02:00
Hide non-existing hardware specific system sensors #73
This commit is contained in:
parent
a8f196f974
commit
ba99451244
1 changed files with 7 additions and 0 deletions
|
@ -194,6 +194,13 @@ def update_items(inst, config_entry, mikrotik_controller, async_add_entities, se
|
|||
|
||||
for sensor in SENSOR_TYPES:
|
||||
if "system_" in sensor:
|
||||
if (
|
||||
mikrotik_controller.data[SENSOR_TYPES[sensor][ATTR_PATH]][
|
||||
SENSOR_TYPES[sensor][ATTR_ATTR]
|
||||
]
|
||||
== "unknown"
|
||||
):
|
||||
continue
|
||||
item_id = f"{inst}-{sensor}"
|
||||
_LOGGER.debug("Updating sensor %s", item_id)
|
||||
if item_id in sensors:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue