From 94eed1fba361cbbaff2920a7fa30c0694b40fc95 Mon Sep 17 00:00:00 2001 From: tomaae <23486452+tomaae@users.noreply.github.com> Date: Tue, 7 Apr 2020 04:01:33 +0200 Subject: [PATCH] Moved interface and available fields to ensure_val #24 --- custom_components/mikrotik_router/mikrotik_controller.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/custom_components/mikrotik_router/mikrotik_controller.py b/custom_components/mikrotik_router/mikrotik_controller.py index 0ea7db5..49ae73a 100644 --- a/custom_components/mikrotik_router/mikrotik_controller.py +++ b/custom_components/mikrotik_router/mikrotik_controller.py @@ -686,7 +686,9 @@ class MikrotikControllerData: {"name": "status", "default": "unknown"}, {"name": "last-seen", "default": "unknown"}, {"name": "server", "default": "unknown"}, - {"name": "interface", "default": ""}, + ], + ensure_vals=[ + {"name": "interface"}, {"name": "available", "type": "bool", "default": False}, ] )