From 275d1384365b78101eeb464be108610d395fc987 Mon Sep 17 00:00:00 2001 From: Evgeny Sorokin Date: Tue, 25 Jun 2024 22:43:09 +0300 Subject: web_kbn upd --- include/py/homekit/modem/config.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/py/homekit/modem/config.py b/include/py/homekit/modem/config.py index 16d1ba0..1653751 100644 --- a/include/py/homekit/modem/config.py +++ b/include/py/homekit/modem/config.py @@ -1,5 +1,11 @@ from ..config import ConfigUnit, Translation from typing import Optional +from enum import Enum + + +class ModemType(Enum): + E3372 = 'e3372' + GPON = 'gpon' class ModemsConfig(ConfigUnit): @@ -18,7 +24,8 @@ class ModemsConfig(ConfigUnit): 'schema': { 'ip': cls._addr_schema(required=True, only_ip=True), 'gateway_ip': cls._addr_schema(required=False, only_ip=True), - 'legacy_auth': {'type': 'boolean', 'required': True} + 'legacy_auth': {'type': 'boolean', 'required': True}, + 'type': {'type': 'string', 'allowed': [t.value for t in ModemType], 'required': True} } } -- cgit v1.2.3