From 3504b660019a337ac0220ec6d090c6a057f6677e Mon Sep 17 00:00:00 2001 From: Tobias Sauerwein Date: Sun, 26 Nov 2023 21:26:53 +0100 Subject: [PATCH] Add BNLD - Bticino dimmable light --- src/pyatmo/modules/__init__.py | 34 ++++++++++++++++-------------- src/pyatmo/modules/bticino.py | 6 +++++- src/pyatmo/modules/device_types.py | 3 +++ 3 files changed, 26 insertions(+), 17 deletions(-) diff --git a/src/pyatmo/modules/__init__.py b/src/pyatmo/modules/__init__.py index ffa4898c..4e697963 100644 --- a/src/pyatmo/modules/__init__.py +++ b/src/pyatmo/modules/__init__.py @@ -9,6 +9,7 @@ BNEU, BNFC, BNIL, + BNLD, BNMH, BNMS, BNSL, @@ -81,23 +82,25 @@ from .somfy import TPSRS __all__ = [ - "BNMS", - "BNAS", "BNAB", - "BNMH", - "BNTH", - "BNFC", - "BNTR", - "BNXM", + "BNAS", "BNCS", "BNCX", "BNDL", "BNEU", + "BNFC", + "BNIL", + "BNLD", + "BNMH", + "BNMS", "BNS", "BNSL", - "BNIL", + "BNTH", + "BNTR", + "BNXM", "Camera", "Dimmer", + "EBU", "Location", "Module", "NACamDoorTag", @@ -117,6 +120,8 @@ "NDB", "NHC", "NIS", + "NLAO", + "NLAS", "NLC", "NLD", "NLDD", @@ -126,7 +131,9 @@ "NLFN", "NLG", "NLIS", + "NLJ", "NLL", + "NLLF", "NLLM", "NLLV", "NLM", @@ -139,16 +146,13 @@ "NLPS", "NLPT", "NLT", + "NLTS", "NLUF", "NLUI", - "NLAO", - "NLLF", - "NLUO", "NLunknown", + "NLUO", "NLUP", "NLV", - "EBU", - "Z3L", "NOC", "NRV", "NSD", @@ -159,7 +163,5 @@ "Shutter", "Switch", "TPSRS", - "NLAS", - "NLTS", - "NLJ", + "Z3L", ] diff --git a/src/pyatmo/modules/bticino.py b/src/pyatmo/modules/bticino.py index 33391a52..f53d7eed 100644 --- a/src/pyatmo/modules/bticino.py +++ b/src/pyatmo/modules/bticino.py @@ -3,7 +3,7 @@ import logging -from pyatmo.modules.module import Module, Switch +from pyatmo.modules.module import Dimmer, Module, Switch LOG = logging.getLogger(__name__) @@ -62,3 +62,7 @@ class BNTR(Module): class BNIL(Switch): """BTicino itelligent light.""" + + +class BNLD(Dimmer): + """BTicino dimmer light.""" diff --git a/src/pyatmo/modules/device_types.py b/src/pyatmo/modules/device_types.py index 71873d9a..deb1f04a 100644 --- a/src/pyatmo/modules/device_types.py +++ b/src/pyatmo/modules/device_types.py @@ -92,6 +92,7 @@ class DeviceType(str, Enum): BNFC = "BNFC" # fan coil BNTR = "BNTR" # radiator BNIL = "BNIL" # intelligent light + BNLD = "BNLD" # dimmer light # Bubbendorf shutters NBG = "NBG" # gateway @@ -194,6 +195,7 @@ class DeviceCategory(str, Enum): DeviceType.NLPD: DeviceCategory.switch, DeviceType.NLJ: DeviceCategory.shutter, DeviceType.BNIL: DeviceCategory.switch, + DeviceType.BNLD: DeviceCategory.dimmer, } @@ -264,6 +266,7 @@ class DeviceCategory(str, Enum): DeviceType.BNFC: ("BTicino", "Fan coil"), DeviceType.BNTR: ("BTicino", "Module towel rail"), DeviceType.BNIL: ("BTicino", "Intelligent light"), + DeviceType.BNLD: ("BTicino", "Dimmer"), # Bubbendorf shutters DeviceType.NBG: ("Bubbendorf", "Gateway"), DeviceType.NBR: ("Bubbendorf", "Roller Shutter"),