@@ -168,6 +168,26 @@ class FroniusSensorEntityDescription(SensorEntityDescription):
168
168
native_unit_of_measurement = UnitOfElectricCurrent .AMPERE ,
169
169
device_class = SensorDeviceClass .CURRENT ,
170
170
state_class = SensorStateClass .MEASUREMENT ,
171
+ translation_key = "current_dc_mppt_no" ,
172
+ translation_placeholders = {"mppt_no" : "2" },
173
+ ),
174
+ FroniusSensorEntityDescription (
175
+ key = "current_dc_3" ,
176
+ default_value = 0 ,
177
+ native_unit_of_measurement = UnitOfElectricCurrent .AMPERE ,
178
+ device_class = SensorDeviceClass .CURRENT ,
179
+ state_class = SensorStateClass .MEASUREMENT ,
180
+ translation_key = "current_dc_mppt_no" ,
181
+ translation_placeholders = {"mppt_no" : "3" },
182
+ ),
183
+ FroniusSensorEntityDescription (
184
+ key = "current_dc_4" ,
185
+ default_value = 0 ,
186
+ native_unit_of_measurement = UnitOfElectricCurrent .AMPERE ,
187
+ device_class = SensorDeviceClass .CURRENT ,
188
+ state_class = SensorStateClass .MEASUREMENT ,
189
+ translation_key = "current_dc_mppt_no" ,
190
+ translation_placeholders = {"mppt_no" : "4" },
171
191
),
172
192
FroniusSensorEntityDescription (
173
193
key = "power_ac" ,
@@ -197,6 +217,26 @@ class FroniusSensorEntityDescription(SensorEntityDescription):
197
217
native_unit_of_measurement = UnitOfElectricPotential .VOLT ,
198
218
device_class = SensorDeviceClass .VOLTAGE ,
199
219
state_class = SensorStateClass .MEASUREMENT ,
220
+ translation_key = "voltage_dc_mppt_no" ,
221
+ translation_placeholders = {"mppt_no" : "2" },
222
+ ),
223
+ FroniusSensorEntityDescription (
224
+ key = "voltage_dc_3" ,
225
+ default_value = 0 ,
226
+ native_unit_of_measurement = UnitOfElectricPotential .VOLT ,
227
+ device_class = SensorDeviceClass .VOLTAGE ,
228
+ state_class = SensorStateClass .MEASUREMENT ,
229
+ translation_key = "voltage_dc_mppt_no" ,
230
+ translation_placeholders = {"mppt_no" : "3" },
231
+ ),
232
+ FroniusSensorEntityDescription (
233
+ key = "voltage_dc_4" ,
234
+ default_value = 0 ,
235
+ native_unit_of_measurement = UnitOfElectricPotential .VOLT ,
236
+ device_class = SensorDeviceClass .VOLTAGE ,
237
+ state_class = SensorStateClass .MEASUREMENT ,
238
+ translation_key = "voltage_dc_mppt_no" ,
239
+ translation_placeholders = {"mppt_no" : "4" },
200
240
),
201
241
# device status entities
202
242
FroniusSensorEntityDescription (
@@ -727,7 +767,7 @@ def __init__(
727
767
self .response_key = description .response_key or description .key
728
768
self .solar_net_id = solar_net_id
729
769
self ._attr_native_value = self ._get_entity_value ()
730
- self ._attr_translation_key = description .key
770
+ self ._attr_translation_key = description .translation_key or description . key
731
771
732
772
def _device_data (self ) -> dict [str , Any ]:
733
773
"""Extract information for SolarNet device from coordinator data."""
0 commit comments