Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 28 additions & 24 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,30 +10,34 @@
"-e",
"GIT_EDITOR=code --wait"
],
"extensions": [
"ms-python.vscode-pylance",
"visualstudioexptteam.vscodeintellicode"
],
"settings": {
"python.pythonPath": "/usr/local/bin/python",
"python.defaultInterpreterPath": "/user/local/bin/python",
"python.linting.pylintEnabled": true,
"python.linting.enabled": true,
"python.formatting.provider": "black",
"python.testing.pytestArgs": [
"--no-cov"
],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true,
"editor.formatOnPaste": false,
"editor.formatOnSave": true,
"editor.formatOnType": true,
"files.trimTrailingWhitespace": true,
"terminal.integrated.profiles.linux": {
"zsh": {
"path": "/usr/bin/zsh"
}
"customizations": {
"vscode": {
"extensions": [
"ms-python.vscode-pylance",
"visualstudioexptteam.vscodeintellicode"
]
},
"terminal.integrated.defaultProfile.linux": "zsh",
"settings": {
"python.pythonPath": "/usr/local/bin/python",
"python.defaultInterpreterPath": "/user/local/bin/python",
"python.linting.pylintEnabled": true,
"python.linting.enabled": true,
"python.formatting.provider": "black",
"python.testing.pytestArgs": [
"--no-cov"
],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true,
"editor.formatOnPaste": false,
"editor.formatOnSave": true,
"editor.formatOnType": true,
"files.trimTrailingWhitespace": true,
"terminal.integrated.profiles.linux": {
"zsh": {
"path": "/usr/bin/zsh"
}
},
"terminal.integrated.defaultProfile.linux": "zsh"
}
}
}
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ dynamic = ["version"]
readme = "README.md"
authors = [{ name = "Hugo Dupras", email = "[email protected]" }]
maintainers = [{ name = "Tobias Sauerwein", email = "[email protected]" }]
requires-python = ">=3.11,<3.13"
requires-python = ">=3.11,<3.14"
dependencies = [
"aiohttp>=3.7.4,<4.0.0",
"oauthlib~=3.1",
Expand Down
2 changes: 2 additions & 0 deletions src/pyatmo/modules/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
)
from .module import Camera, Dimmer, Fan, Module, Shutter, Switch
from .netatmo import (
NAC,
NCO,
NDB,
NHC,
Expand Down Expand Up @@ -157,6 +158,7 @@
"NLV",
"NOC",
"NRV",
"NAC",
"NSD",
"OTH",
"OTM",
Expand Down
3 changes: 3 additions & 0 deletions src/pyatmo/modules/device_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class DeviceType(str, Enum):
NAPlug = "NAPlug" # Smart thermostat gateway
NATherm1 = "NATherm1" # Smart thermostat
NRV = "NRV" # Smart valve
NAC = "NAC" # Smart AC control
OTH = "OTH" # OpenTherm gateway
OTM = "OTM" # OpenTherm modulating thermostat

Expand Down Expand Up @@ -150,6 +151,7 @@ class DeviceCategory(str, Enum):

DEVICE_CATEGORY_MAP: dict[DeviceType, DeviceCategory] = {
DeviceType.NRV: DeviceCategory.climate,
DeviceType.NAC: DeviceCategory.climate,
DeviceType.NATherm1: DeviceCategory.climate,
DeviceType.OTM: DeviceCategory.climate,
DeviceType.NOC: DeviceCategory.camera,
Expand Down Expand Up @@ -212,6 +214,7 @@ class DeviceCategory(str, Enum):
DeviceType.NAPlug: ("Netatmo", "Smart Thermostat Gateway"),
DeviceType.NATherm1: ("Netatmo", "Smart Thermostat"),
DeviceType.NRV: ("Netatmo", "Smart Valve"),
DeviceType.NAC: ("Netatmo", "Smart AC Control"),
DeviceType.OTH: ("Netatmo", "OpenTherm Gateway"),
DeviceType.OTM: ("Netatmo", "OpenTherm Modulating Thermostat"),
# Netatmo Cameras/Security
Expand Down
4 changes: 4 additions & 0 deletions src/pyatmo/modules/netatmo.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ class NRV(FirmwareMixin, RfMixin, BatteryMixin, Module):
"""Class to represent a Netatmo NRV."""


class NAC(FirmwareMixin, RfMixin, BatteryMixin, Module):
"""Class to represent a Netatmo NAC."""


class NATherm1(FirmwareMixin, RfMixin, BatteryMixin, BoilerMixin, Module):
"""Class to represent a Netatmo NATherm1."""

Expand Down
2 changes: 2 additions & 0 deletions src/pyatmo/room.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ def evaluate_device_type(self) -> None:
self.features.add("humidity")
elif "NRV" in self.device_types:
self.climate_type = DeviceType.NRV
elif "NAC" in self.device_types:
self.climate_type = DeviceType.NAC
elif "BNTH" in self.device_types:
self.climate_type = DeviceType.BNTH

Expand Down
1 change: 1 addition & 0 deletions src/pyatmo/schedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class ScheduleType(StrEnum):
COOLING = "cooling"
ELECTRICITY = "electricity"
EVENT = "event"
AUTO = "auto"


@dataclass
Expand Down