File tree Expand file tree Collapse file tree 1 file changed +16
-5
lines changed Expand file tree Collapse file tree 1 file changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -478,12 +478,23 @@ async def handle_set_charge_rate(call):
478
478
479
479
accepted_measurands = "," .join (accepted_measurands )
480
480
481
- _LOGGER .debug (f"'{ self .id } ' allowed measurands '{ accepted_measurands } '" )
481
+ if len (accepted_measurands ) > 0 :
482
+ _LOGGER .debug (f"'{ self .id } ' allowed measurands '{ accepted_measurands } '" )
483
+ await self .configure (
484
+ ckey .meter_values_sampled_data .value ,
485
+ accepted_measurands ,
486
+ )
487
+ 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 } '" )
482
494
483
- await self .configure (
484
- ckey .meter_values_sampled_data .value ,
485
- accepted_measurands ,
486
- )
495
+ updated_entry = {** self .entry .data }
496
+ updated_entry [CONF_MONITORED_VARIABLES ] = accepted_measurands
497
+ self .hass .config_entries .async_update_entry (self .entry , data = updated_entry )
487
498
488
499
await self .configure (
489
500
ckey .meter_value_sample_interval .value ,
You can’t perform that action at this time.
0 commit comments