Skip to content

Commit

Permalink
Add BNLD - Bticino dimmable light
Browse files Browse the repository at this point in the history
  • Loading branch information
cgtobi committed Nov 26, 2023
1 parent bfb910e commit 3504b66
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 17 deletions.
34 changes: 18 additions & 16 deletions src/pyatmo/modules/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
BNEU,
BNFC,
BNIL,
BNLD,
BNMH,
BNMS,
BNSL,
Expand Down Expand Up @@ -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",
Expand All @@ -117,6 +120,8 @@
"NDB",
"NHC",
"NIS",
"NLAO",
"NLAS",
"NLC",
"NLD",
"NLDD",
Expand All @@ -126,7 +131,9 @@
"NLFN",
"NLG",
"NLIS",
"NLJ",
"NLL",
"NLLF",
"NLLM",
"NLLV",
"NLM",
Expand All @@ -139,16 +146,13 @@
"NLPS",
"NLPT",
"NLT",
"NLTS",
"NLUF",
"NLUI",
"NLAO",
"NLLF",
"NLUO",
"NLunknown",
"NLUO",
"NLUP",
"NLV",
"EBU",
"Z3L",
"NOC",
"NRV",
"NSD",
Expand All @@ -159,7 +163,5 @@
"Shutter",
"Switch",
"TPSRS",
"NLAS",
"NLTS",
"NLJ",
"Z3L",
]
6 changes: 5 additions & 1 deletion src/pyatmo/modules/bticino.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__)

Expand Down Expand Up @@ -62,3 +62,7 @@ class BNTR(Module):

class BNIL(Switch):
"""BTicino itelligent light."""


class BNLD(Dimmer):
"""BTicino dimmer light."""
3 changes: 3 additions & 0 deletions src/pyatmo/modules/device_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -194,6 +195,7 @@ class DeviceCategory(str, Enum):
DeviceType.NLPD: DeviceCategory.switch,
DeviceType.NLJ: DeviceCategory.shutter,
DeviceType.BNIL: DeviceCategory.switch,
DeviceType.BNLD: DeviceCategory.dimmer,
}


Expand Down Expand Up @@ -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"),
Expand Down

0 comments on commit 3504b66

Please sign in to comment.