Skip to content

Commit 7070c76

Browse files
authored
Merge pull request BenPru#397 from blue-bean/main
Fix for BenPru#396 Tested and seems to work
2 parents 3be1576 + 1c8611b commit 7070c76

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

custom_components/luxtronik/coordinator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ def _build_device_name(
249249
) -> str:
250250
if platform is None:
251251
return str(key.value)
252-
return platform.platform_translations.get(
252+
return platform.platform_data.platform_translations.get(
253253
f"component.{DOMAIN}.entity.device.{key.value}.name"
254254
)
255255

custom_components/luxtronik/sensor.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -377,24 +377,24 @@ def _build_status_text(self) -> str:
377377
return ""
378378
if line_2_state is None or line_2_state == STATE_UNAVAILABLE:
379379
return ""
380-
line_1 = self.platform.platform_translations.get(
380+
line_1 = self.platform.platform_data.platform_translations.get(
381381
f"component.{DOMAIN}.entity.sensor.status_line_1.state.{line_1_state}"
382382
)
383-
line_2 = self.platform.platform_translations.get(
383+
line_2 = self.platform.platform_data.platform_translations.get(
384384
f"component.{DOMAIN}.entity.sensor.status_line_2.state.{line_2_state}"
385385
)
386386
# Show evu end time if available
387387
evu_event_minutes = self._calc_next_evu_event_minutes()
388388
if evu_event_minutes is None:
389389
pass
390390
elif self.native_value == LuxOperationMode.evu.value:
391-
text_locale = self.platform.platform_translations.get(
391+
text_locale = self.platform.platform_data.platform_translations.get(
392392
f"component.{DOMAIN}.entity.sensor.status.state_attributes.evu_text.state.evu_until"
393393
)
394394
evu_until = text_locale.format(evu_time=evu_event_minutes)
395395
return f"{evu_until} {line_1} {line_2} {status_time}."
396396
elif evu_event_minutes <= 30:
397-
text_locale = self.platform.platform_translations.get(
397+
text_locale = self.platform.platform_data.platform_translations.get(
398398
f"component.{DOMAIN}.entity.sensor.status.state_attributes.evu_text.state.evu_in"
399399
)
400400
evu_in = text_locale.format(evu_time=evu_event_minutes)

0 commit comments

Comments
 (0)