@@ -66,27 +66,27 @@ def __init__(self, id, connection, response_timeout=30):
66
66
@on (Action .GetConfiguration )
67
67
def on_get_configuration (self , key , ** kwargs ):
68
68
"""Handle a get configuration requests."""
69
- if key == ConfigurationKey .supported_feature_profiles :
69
+ if key [ 0 ] == ConfigurationKey .supported_feature_profiles . value :
70
70
return call_result .GetConfigurationPayload (
71
- configuration_key = {"key" :key , "readonly" : "false" , "value" : "Core,FirmwareManagement,SmartCharging" }
71
+ configuration_key = [ {"key" :key [ 0 ] , "readonly" : "false" , "value" : "Core,FirmwareManagement,SmartCharging" }]
72
72
)
73
- if key == ConfigurationKey .heartbeat_interval :
74
- return call_result .GetConfigurationPayload (configuration_key = {"key" :key , "readonly" : "false" , "value" :"300" })
75
- if key == ConfigurationKey .number_of_connectors :
76
- return call_result .GetConfigurationPayload (configuration_key = {"key" :key , "readonly" : "false" , "value" :"1" })
77
- if key == ConfigurationKey .web_socket_ping_interval :
78
- return call_result .GetConfigurationPayload (configuration_key = {"key" :key , "readonly" : "false" , "value" :"60" })
79
- if key == ConfigurationKey .meter_values_sampled_data :
73
+ if key [ 0 ] == ConfigurationKey .heartbeat_interval . value :
74
+ return call_result .GetConfigurationPayload (configuration_key = [ {"key" :key [ 0 ] , "readonly" : "false" , "value" :"300" }] )
75
+ if key [ 0 ] == ConfigurationKey .number_of_connectors . value :
76
+ return call_result .GetConfigurationPayload (configuration_key = [ {"key" :key [ 0 ] , "readonly" : "false" , "value" :"1" }] )
77
+ if key [ 0 ] == ConfigurationKey .web_socket_ping_interval . value :
78
+ return call_result .GetConfigurationPayload (configuration_key = [ {"key" :key [ 0 ] , "readonly" : "false" , "value" :"60" }] )
79
+ if key [ 0 ] == ConfigurationKey .meter_values_sampled_data . value :
80
80
return call_result .GetConfigurationPayload (
81
- configuration_key = {"key" :key , "readonly" : "false" , "value" :"energy_reactive_import_register" }
81
+ configuration_key = [ {"key" :key [ 0 ] , "readonly" : "false" , "value" :"energy_reactive_import_register" }]
82
82
)
83
- if key == ConfigurationKey .meter_value_sample_interval :
84
- return call_result .GetConfigurationPayload (configuration_key = {"key" :key , "readonly" : "false" , "value" :"60" })
85
- if key == ConfigurationKey .charging_schedule_allowed_charging_rate_unit :
86
- return call_result .GetConfigurationPayload (configuration_key = {"key" :key , "readonly" : "false" , "value" :"Current" })
87
- if key == ConfigurationKey .authorize_remote_tx_requests :
88
- return call_result .GetConfigurationPayload (configuration_key = {"key" :key , "readonly" : "false" , "value" :"false" })
89
- return call_result .GetConfigurationPayload (configuration_key = {"key" :key , "readonly" : "false" , "value" :"" })
83
+ if key [ 0 ] == ConfigurationKey .meter_value_sample_interval . value :
84
+ return call_result .GetConfigurationPayload (configuration_key = [ {"key" :key [ 0 ] , "readonly" : "false" , "value" :"60" }] )
85
+ if key [ 0 ] == ConfigurationKey .charging_schedule_allowed_charging_rate_unit . value :
86
+ return call_result .GetConfigurationPayload (configuration_key = [ {"key" :key [ 0 ] , "readonly" : "false" , "value" :"Current" }] )
87
+ if key [ 0 ] == ConfigurationKey .authorize_remote_tx_requests . value :
88
+ return call_result .GetConfigurationPayload (configuration_key = [ {"key" :key [ 0 ] , "readonly" : "false" , "value" :"false" }] )
89
+ return call_result .GetConfigurationPayload (configuration_key = [ {"key" :key [ 0 ] , "readonly" : "false" , "value" :"" }] )
90
90
91
91
@on (Action .ChangeConfiguration )
92
92
def on_change_configuration (self , ** kwargs ):
0 commit comments