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

Update device model #302

Merged
merged 3 commits into from
Jan 6, 2022
Merged
Changes from 1 commit
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
14 changes: 8 additions & 6 deletions pyoverkiz/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
GatewayType,
ProductType,
UpdateBoxStatus,
UIWidget,
UIClass,
)

# pylint: disable=unused-argument, too-many-instance-attributes, too-many-locals
Expand Down Expand Up @@ -151,8 +153,8 @@ class Device:
controllable_name: str
definition: Definition
data_properties: list[dict[str, Any]] | None = None
widget: str | None = None
iMicknl marked this conversation as resolved.
Show resolved Hide resolved
ui_class: str | None = None
widget: UIWidget
ui_class: UIClass
states: States
type: ProductType
place_oid: str
Expand All @@ -168,8 +170,8 @@ def __init__(
controllable_name: str,
definition: dict[str, Any],
data_properties: list[dict[str, Any]] | None = None,
widget: str | None = None,
ui_class: str | None = None,
widget: UIWidget
ui_class: UIClass
states: list[dict[str, Any]] | None = None,
type: int,
place_oid: str,
Expand All @@ -185,8 +187,8 @@ def __init__(
self.controllable_name = controllable_name
self.states = States(states)
self.data_properties = data_properties
self.widget = widget
self.ui_class = ui_class
self.widget = UIWidget(widget)
self.ui_class = UIClass(ui_class)
iMicknl marked this conversation as resolved.
Show resolved Hide resolved
self.type = ProductType(type)
self.place_oid = place_oid

Expand Down