8000 Mode standard by gduteil · Pull Request #19 · hekmon/linkytic · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Mode standard #19

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

Merged
merged 3 commits into from
Nov 2, 2023
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
6 changes: 4 additions & 2 deletions custom_components/linkytic/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
OPTIONS_REALTIME,
SETUP_SERIAL,
SETUP_THREEPHASE,
TICMODE_HISTORIC,
SETUP_TICMODE,
SETUP_PRODUCER,
)
from .serial_reader import LinkyTICReader

Expand All @@ -27,7 +28,8 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
serial_reader = LinkyTICReader(
title=entry.title,
port=entry.data.get(SETUP_SERIAL),
std_mode=entry.data.get(TICMODE_HISTORIC),
std_mode=entry.data.get(SETUP_TICMODE),
producer_mode=entry.data.get(SETUP_PRODUCER),
three_phase=entry.data.get(SETUP_THREEPHASE),
real_time=entry.options.get(OPTIONS_REALTIME),
)
Expand Down
3 changes: 3 additions & 0 deletions custom_components/linkytic/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
SETUP_THREEPHASE,
SETUP_THREEPHASE_DEFAULT,
SETUP_TICMODE,
SETUP_PRODUCER,
SETUP_PRODUCER_DEFAULT,
TICMODE_HISTORIC,
TICMODE_HISTORIC_LABEL,
TICMODE_STANDARD,
Expand All @@ -46,6 +48,7 @@
]
),
),
vol.Required(SETUP_PRODUCER, default=SETUP_PRODUCER_DEFAULT): bool,
vol.Required(SETUP_THREEPHASE, default=SETUP_THREEPHASE_DEFAULT): bool,
}
)
Expand Down
5 changes: 3 additions & 2 deletions custom_components/linkytic/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@
SETUP_SERIAL = "serial_device"
SETUP_SERIAL_DEFAULT = "/dev/ttyUSB0"
SETUP_TICMODE = "tic_mode"
SETUP_PRODUCER = "producer_mode"
SETUP_PRODUCER_DEFAULT = False
SETUP_THREEPHASE = "three_phase"
SETUP_THREEPHASE_DEFAULT = False

OPTIONS_REALTIME = "real_time"


# Protocol configuration
# # https://www.enedis.fr/media/2035/download

Expand Down Expand Up @@ -123,6 +124,6 @@
"64": "Compteur monophasé 60 A généralisation Linky G3 - arrivée puissance basse",
"70": "Compteur monophasé Linky 60 A mise au point G3",
"71": "Compteur triphasé Linky 60 A mise au point G3",
"72": "Compteur monophasé 90 A généralisation Linky G3 - arrivée puissance basse",
"75": "Compteur monophasé 90 A généralisation Linky G3 - arrivée puissance basse",
"76": "Compteur triphasé 60 A généralisation Linky G3 - arrivée puissance basse",
}
Loading
0