Skip to content

Commit

Permalink
Merge pull request #456 from NatMarchand/feat/improvments
Browse files Browse the repository at this point in the history
feat: improvments
  • Loading branch information
jabesq authored Oct 10, 2023
2 parents 1e7702c + 49dad0d commit 85f6330
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
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 @@ -607,11 +607,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

0 comments on commit 85f6330

Please sign in to comment.