@@ -70,7 +70,7 @@ ulm_translation_engine:
70
70
let def = ["unknown", "unavailable"];
71
71
let lang = hass["language"];
72
72
let domain = entity.entity_id.substr(0, entity.entity_id.indexOf("."));
73
- var translation = hass.resources[lang]["component." + domain + ".state._ ." + state]
73
+ var translation = hass.resources[lang]["component." + domain + ".entity_component._.state ." + state]
74
74
const now = new Date();
75
75
const timestamp = (new Date(state)).getTime();
76
76
const nowTimeStamp = now.getTime();
@@ -90,7 +90,7 @@ ulm_translation_engine:
90
90
var translation = hass.resources[lang]["state.default." + state ];
91
91
}
92
92
else if (domain == "binary_sensor" && d_class != ''){
93
- var translation = hass.resources[lang]["component." + domain + ".state ." + d_class + "." + state]
93
+ var translation = hass.resources[lang]["component." + domain + ".entity_component ." + d_class + ".state ." + state]
94
94
}
95
95
else if (d_class == 'timestamp'){
96
96
var translation = formatter.format(diff, scale)
@@ -140,20 +140,20 @@ ulm_translation_engine:
140
140
else if (Math.abs(minutesDiff) < 60){ scale = 'minute'; diff = minutesDiff }
141
141
else if (Math.abs(hoursDiff) < 24){ scale = 'hour'; diff = hoursDiff }
142
142
143
- if(hass.resources[lang]["component." + domain + ".state._ ." + state]){
144
- var translation = hass.resources[lang]["component." + domain + ".state._ ." + state] + unit
143
+ if(hass.resources[lang]["component." + domain + ".entity_component._.state ." + state]){
144
+ var translation = hass.resources[lang]["component." + domain + ".entity_component._.state ." + state] + unit
145
145
} else {
146
146
var translation = state + unit;
147
147
}
148
148
if (def.includes(state)) {
149
149
var translation = hass.resources[lang]["state.default." + state ];
150
150
}
151
151
else if (domain == "binary_sensor" && d_class != ''){
152
- var translation = hass.resources[lang]["component." + domain + ".state ." + d_class + "." + state]
152
+ var translation = hass.resources[lang]["component." + domain + ".entity_component ." + d_class + ".state ." + state]
153
153
}
154
154
else if (domain == "media_player" && d_class != ''){
155
155
if (state == 'idle' || state == 'paused')
156
- var translation = hass.resources[lang]["component." + domain + ".state." + state];
156
+ var translation = hass.resources[lang]["component." + domain + ".entity_component._. state." + state];
157
157
else {
158
158
var translation = (entity.attributes.source) + ' • ' + ( Math.round(entity.attributes.volume_level / 0.01)) + '%' ;
159
159
}
0 commit comments