Skip to content

Commit a5676d0

Browse files
authored
Merge branch 'main' into dependabot/pip/dot-github/workflows/pip-gte-21.0-and-lt-24.2
2 parents 493b0e6 + 2ba4b55 commit a5676d0

File tree

2 files changed

+16
-11
lines changed

2 files changed

+16
-11
lines changed

custom_components/ocpp/api.py

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -464,33 +464,36 @@ async def handle_set_charge_rate(call):
464464
all_measurands = self.entry.data.get(
465465
CONF_MONITORED_VARIABLES, DEFAULT_MEASURAND
466466
)
467+
key = ckey.meter_values_sampled_data.value
468+
chgr_measurands = await self.get_configuration(key)
467469

468470
accepted_measurands = []
469-
key = ckey.meter_values_sampled_data.value
471+
cfg_ok = [
472+
ConfigurationStatus.accepted,
473+
ConfigurationStatus.reboot_required,
474+
]
470475

471476
for measurand in all_measurands.split(","):
472-
_LOGGER.debug(f"'{self.id}' trying measurand '{measurand}'")
477+
_LOGGER.debug(f"'{self.id}' trying measurand: '{measurand}'")
473478
req = call.ChangeConfiguration(key=key, value=measurand)
474479
resp = await self.call(req)
475-
if resp.status == ConfigurationStatus.accepted:
476-
_LOGGER.debug(f"'{self.id}' adding measurand '{measurand}'")
480+
if resp.status in cfg_ok:
481+
_LOGGER.debug(f"'{self.id}' adding measurand: '{measurand}'")
477482
accepted_measurands.append(measurand)
478483

479484
accepted_measurands = ",".join(accepted_measurands)
480485

481486
if len(accepted_measurands) > 0:
482-
_LOGGER.debug(f"'{self.id}' allowed measurands '{accepted_measurands}'")
487+
_LOGGER.debug(
488+
f"'{self.id}' allowed measurands: '{accepted_measurands}'"
489+
)
483490
await self.configure(
484491
ckey.meter_values_sampled_data.value,
485492
accepted_measurands,
486493
)
487494
else:
488-
_LOGGER.debug(f"'{self.id}' measurands not configurable by OCPP")
489-
resp = await self.get_configuration(
490-
ckey.meter_values_sampled_data.value
491-
)
492-
accepted_measurands = resp
493-
_LOGGER.debug(f"'{self.id}' allowed measurands '{accepted_measurands}'")
495+
_LOGGER.debug(f"'{self.id}' measurands not configurable by integration")
496+
_LOGGER.debug(f"'{self.id}' allowed measurands: '{chgr_measurands}'")
494497

495498
updated_entry = {**self.entry.data}
496499
updated_entry[CONF_MONITORED_VARIABLES] = accepted_measurands

docs/supported-devices.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ All OCPP 1.6j compatible devices should be supported, but not every device offer
99

1010
## [ABB Terra AC-W22-T-0](https://new.abb.com/products/6AGC081279/tac-w22-t-0)
1111

12+
## [ABB Terra TAC-W22-T-RD-MC-0](https://new.abb.com/products/6AGC081281/tac-w22-t-rd-mc-0)
13+
1214
## [Alfen - Eve Single Pro-line](https://alfen.com/en/ev-charge-points/alfen-product-range)
1315

1416
## [Alfen - Eve Single S-line](https://alfen.com/en/ev-charge-points/alfen-product-range)

0 commit comments

Comments
 (0)