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: add required is_totalizer field to contxt field create command #380

Merged
merged 6 commits into from
Jan 24, 2024
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
3 changes: 2 additions & 1 deletion contxt/cli/commands/iot.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from contxt.models.iot import Feed, Field, FieldCategory, FieldGrouping, FieldValueType, Window
from contxt.utils.serializer import Serializer

NEW_FIELD_ATTRS = ["field_descriptor", "label", "value_type", "units", "grouping", "category"]
NEW_FIELD_ATTRS = ["field_descriptor", "label", "value_type", "units", "is_totalizer", "grouping", "category"]


@click.group()
Expand Down Expand Up @@ -182,6 +182,7 @@ def create(clients: Clients, feed_key: str, input: IO[str]) -> None:
units=r["units"],
value_type=FieldValueType(r["value_type"].lower()),
is_hidden=False,
is_totalizer=r["is_totalizer"],
),
r["grouping"],
r["category"],
Expand Down
Loading