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
8 changes: 4 additions & 4 deletions packages/modules/common/component_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,10 +250,10 @@ def __init__(self,
class IoState:
"""JSON erlaubt nur Zeichenketten als Schlüssel für Objekte"""

def __init__(self, analog_input: Dict[str, float] = None,
digital_input: Dict[str, bool] = None,
analog_output: Dict[str, float] = None,
digital_output: Dict[str, bool] = None) -> None:
def __init__(self, analog_input: Optional[Dict[str, float]] = None,
digital_input: Optional[Dict[str, bool]] = None,
analog_output: Optional[Dict[str, float]] = None,
digital_output: Optional[Dict[str, bool]] = None) -> None:
self.analog_input = analog_input
self.digital_input = digital_input
self.analog_output = analog_output
Expand Down
4 changes: 2 additions & 2 deletions packages/modules/consumers/generic/mqtt/config.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Tuple
from typing import Tuple, Optional

from control.consumer.consumer_data import ConsumerUsage
from helpermodules.auto_str import auto_str
Expand All @@ -18,7 +18,7 @@ def __init__(self,
name: str = "MQTT-Verbraucher",
type: str = "mqtt",
id: int = 0,
configuration: MqttConfiguration = None,
configuration: Optional[MqttConfiguration] = None,
usage: Tuple[ConsumerUsage, ...] = (ConsumerUsage.METER_ONLY,
ConsumerUsage.CONTINUOUS,
ConsumerUsage.SELF_CONTROLLED,
Expand Down
2 changes: 1 addition & 1 deletion packages/modules/consumers/generic/mqtt/consumer.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@


def create_consumer(config: Mqtt):
def update() -> None:
def update() -> ConsumerState:
def parse_received_topics(value: str):
return received_topics.get(f"{topic_prefix}{value}", get_default(ConsumerState, value))

Expand Down