Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: improvments #456

Merged
merged 2 commits into from
Oct 10, 2023
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
9 changes: 5 additions & 4 deletions src/pyatmo/modules/legrand.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import logging

from pyatmo.modules.module import (
BatteryMixin,
ContactorMixin,
Dimmer,
EnergyMixin,
Expand All @@ -24,15 +25,15 @@
# pylint: disable=R0901


class NLG(FirmwareMixin, Module):
class NLG(FirmwareMixin, OffloadMixin, WifiMixin, Module):
"""Legrand gateway."""


class NLT(FirmwareMixin, Module):
class NLT(FirmwareMixin, BatteryMixin, Module):
"""Legrand global remote control."""


class NLP(Switch):
class NLP(Switch, HistoryMixin, PowerMixin, OffloadMixin, Module):
"""Legrand plug."""


Expand Down Expand Up @@ -104,7 +105,7 @@ class NLPS(FirmwareMixin, PowerMixin, EnergyMixin, Module):
"""Legrand / BTicino smart load shedder."""


class NLC(FirmwareMixin, SwitchMixin, Module):
class NLC(FirmwareMixin, SwitchMixin, HistoryMixin, PowerMixin, OffloadMixin, Module):
"""Legrand / BTicino cable outlet."""


Expand Down
4 changes: 2 additions & 2 deletions src/pyatmo/modules/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -467,11 +467,11 @@ async def async_update_measures(
if start_time is None:
start_time = end_time - days * 24 * 60 * 60

data_point = MeasureType.SUM_ENERGY_ELEC_BASIC.name
data_point = MeasureType.SUM_ENERGY_ELEC_BASIC.value
params = {
"device_id": self.bridge,
"module_id": self.entity_id,
"scale": interval.name,
"scale": interval.value,
"type": data_point,
"date_begin": start_time,
"date_end": end_time,
Expand Down