Skip to content

Commit

Permalink
Add support for Legrand garage door opener (NLJ) (#464)
Browse files Browse the repository at this point in the history
* Add support for Legrand garage door opener (NLJ)

https://www.legrand.fr/pro/catalogue/module-pour-porte-de-garage-et-portail-pour-installation-connectee-with-netatmo

* Add support for BTicino intelligent light (BNIL)
  • Loading branch information
cgtobi authored Nov 1, 2023
1 parent 51c7e46 commit 5b9b337
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

-
- support for Legrand garage door opener (NLJ)
- support for BTicino intelligent light (BNIL)

### Changed

Expand Down
4 changes: 4 additions & 0 deletions src/pyatmo/modules/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
BNDL,
BNEU,
BNFC,
BNIL,
BNMH,
BNMS,
BNSL,
Expand All @@ -29,6 +30,7 @@
NLFN,
NLG,
NLIS,
NLJ,
NLL,
NLLF,
NLLM,
Expand Down Expand Up @@ -93,6 +95,7 @@
"BNEU",
"BNS",
"BNSL",
"BNIL",
"Camera",
"Dimmer",
"Location",
Expand Down Expand Up @@ -158,4 +161,5 @@
"TPSRS",
"NLAS",
"NLTS",
"NLJ",
]
4 changes: 4 additions & 0 deletions src/pyatmo/modules/bticino.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,7 @@ class BNFC(Module):

class BNTR(Module):
"""BTicino radiator thermostat."""


class BNIL(Switch):
"""BTicino itelligent light."""
6 changes: 6 additions & 0 deletions src/pyatmo/modules/device_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ class DeviceType(str, Enum):
NLUP = "NLUP" # Legrand device stub
NLLF = "NLLF" # Legrand Centralized Ventilation Control
NLTS = "NLTS" # Legrand motion sensor stub
NLJ = "NLJ" # Legrand garage door opener

# BTicino Classe 300 EOS
BNCX = "BNCX" # internal panel = gateway
Expand All @@ -90,6 +91,7 @@ class DeviceType(str, Enum):
BNTH = "BNTH" # thermostat
BNFC = "BNFC" # fan coil
BNTR = "BNTR" # radiator
BNIL = "BNIL" # intelligent light

# Bubbendorf shutters
NBG = "NBG" # gateway
Expand Down Expand Up @@ -190,6 +192,8 @@ class DeviceCategory(str, Enum):
DeviceType.BNFC: DeviceCategory.climate,
DeviceType.BNTR: DeviceCategory.climate,
DeviceType.NLPD: DeviceCategory.switch,
DeviceType.NLJ: DeviceCategory.shutter,
DeviceType.BNIL: DeviceCategory.switch,
}


Expand Down Expand Up @@ -246,6 +250,7 @@ class DeviceCategory(str, Enum):
DeviceType.NLUI: ("Legrand", "In-wall switch"),
DeviceType.NLTS: ("Legrand", "Motion sensor"),
DeviceType.NLUF: ("Legrand", "In-Wall dimmer"),
DeviceType.NLJ: ("Legrand", "Garage door opener"),
# BTicino Classe 300 EOS
DeviceType.BNCX: ("BTicino", "Internal Panel"),
DeviceType.BNEU: ("BTicino", "External Unit"),
Expand All @@ -258,6 +263,7 @@ class DeviceCategory(str, Enum):
DeviceType.BNTH: ("BTicino", "Thermostat"),
DeviceType.BNFC: ("BTicino", "Fan coil"),
DeviceType.BNTR: ("BTicino", "Module towel rail"),
DeviceType.BNIL: ("BTicino", "Intelligent light"),
# Bubbendorf shutters
DeviceType.NBG: ("Bubbendorf", "Gateway"),
DeviceType.NBR: ("Bubbendorf", "Roller Shutter"),
Expand Down
4 changes: 4 additions & 0 deletions src/pyatmo/modules/legrand.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,3 +159,7 @@ class NLTS(Module):

class NLPD(FirmwareMixin, SwitchMixin, Module):
"""NLPD dry contact."""


class NLJ(FirmwareMixin, RfMixin, ShutterMixin, Module):
"""Legrand garage door opener."""

0 comments on commit 5b9b337

Please sign in to comment.