diff --git a/packages/modules/consumers/shelly/shelly_em/consumer.py b/packages/modules/consumers/shelly/shelly_em/consumer.py index edceb74e85..001dcec6af 100644 --- a/packages/modules/consumers/shelly/shelly_em/consumer.py +++ b/packages/modules/consumers/shelly/shelly_em/consumer.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -from control import data from modules.common.abstract_device import DeviceDescriptor from typing import Optional from modules.common.component_state import ConsumerState @@ -24,8 +23,7 @@ def error_handler() -> None: def update() -> ConsumerState: status = request_status(config.configuration.ip_address, generation) - powers, voltages, currents, _, power, _ = parse_data( - data.data.consumer_data[f"consumer{config.id}"].data.config.phase_1, config.configuration.factor, status) + powers, voltages, currents, _, power, _ = parse_data(1, config.configuration.factor, status) imported, exported = sim_counter.sim_count(power) consumer_state = ConsumerState( power=power, diff --git a/packages/modules/consumers/shelly/shelly_pm/consumer.py b/packages/modules/consumers/shelly/shelly_pm/consumer.py index 74e02cd600..e1bd62c5c9 100644 --- a/packages/modules/consumers/shelly/shelly_pm/consumer.py +++ b/packages/modules/consumers/shelly/shelly_pm/consumer.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -from control import data from modules.common import req from typing import Optional from modules.common.abstract_device import DeviceDescriptor @@ -62,8 +61,7 @@ def switch_off() -> None: def update() -> ConsumerState: status = request_status(config.configuration.ip_address, generation) - powers, voltages, currents, _, power, _ = parse_data( - data.data.consumer_data[f"consumer{config.id}"].data.config.phase_1, config.configuration.factor, status) + powers, voltages, currents, _, power, _ = parse_data(1, config.configuration.factor, status) imported, exported = sim_counter.sim_count(power) return ConsumerState( power=power,