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

Add early linky (G1 pilote) #44

Merged
merged 3 commits into from
Nov 14, 2024
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
4 changes: 4 additions & 0 deletions custom_components/linkytic/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,10 @@
"62": "Compteur monophasé 90 A généralisation Linky G1 - arrivée puissance basse",
"63": "Compteur triphasé 60 A généralisation Linky G1 - arrivée puissance basse",
"64": "Compteur monophasé 60 A généralisation Linky G3 - arrivée puissance basse",
"65": "Compteur monophasé 90A LINKY expérimentation CPL G3",
"66": "Module du compteur modulaire généralisation",
"67": "Compteur monophasé 90A LINKY - pilote G1 - arrivée basse",
"68": "Compteur triphasé 60A LINKY - pilote G1 - arrivée basse",
"70": "Compteur monophasé Linky 60 A mise au point G3",
"71": "Compteur triphasé Linky 60 A mise au point G3",
"75": "Compteur monophasé 90 A généralisation Linky G3 - arrivée puissance basse",
Expand Down
63 changes: 63 additions & 0 deletions custom_components/linkytic/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,69 @@ async def async_setup_entry(
field=StatusRegister.POINTE_MOBILE,
),
]
# Handle protocol deviation for experimental/pilote modules
if (serial_reader.device_identification[DID_TYPE_CODE]=="67"):
sensors.append(
ApparentPowerSensor(
tag="SINST1",
name="Puissance app. instantanée soutirée",
config_title=config_entry.title,
config_uniq_id=config_entry.entry_id,
serial_reader=serial_reader,
register_callback=True,
)
)
sensors.append(
ApparentPowerSensor(
tag="SMAXN",
name="Puissance app. max. soutirée n",
config_title=config_entry.title,
config_uniq_id=config_entry.entry_id,
serial_reader=serial_reader,
register_callback=True,
)
)
sensors.append(
ApparentPowerSensor(
tag="SMAXN-1",
name="Puissance app. max. soutirée n-1",
config_title=config_entry.title,
config_uniq_id=config_entry.entry_id,
serial_reader=serial_reader,
register_callback=True,
)
)
else:
sensors.append(
ApparentPowerSensor(
tag="SINSTS",
name="Puissance app. instantanée soutirée",
config_title=config_entry.title,
config_uniq_id=config_entry.entry_id,
serial_reader=serial_reader,
register_callback=True,
)
)
sensors.append(
ApparentPowerSensor(
tag="SMAXSN",
name="Puissance app. max. soutirée n",
config_title=config_entry.title,
config_uniq_id=config_entry.entry_id,
serial_reader=serial_reader,
register_callback=True,
)
)
sensors.append(
ApparentPowerSensor(
tag="SMAXSN-1",
name="Puissance app. max. soutirée n-1",
config_title=config_entry.title,
config_uniq_id=config_entry.entry_id,
serial_reader=serial_reader,
register_callback=True,
)
)
# Add producer specific sensors
if bool(config_entry.data.get(SETUP_PRODUCER)):
sensors.append(
Expand Down
Loading