Skip to content

Commit

Permalink
Merge pull request #1277 from UI-Lovelace-Minimalist/release
Browse files Browse the repository at this point in the history
Release v1.3.4
  • Loading branch information
basbruss committed Apr 13, 2023
2 parents dbb21a3 + 39ecbd0 commit 6244100
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ ulm_translation_engine:
let def = ["unknown", "unavailable"];
let lang = hass["language"];
let domain = entity.entity_id.substr(0, entity.entity_id.indexOf("."));
var translation = hass.resources[lang]["component." + domain + ".state._." + state]
var translation = hass.resources[lang]["component." + domain + ".entity_component._.state." + state]
const now = new Date();
const timestamp = (new Date(state)).getTime();
const nowTimeStamp = now.getTime();
Expand All @@ -90,7 +90,7 @@ ulm_translation_engine:
var translation = hass.resources[lang]["state.default." + state ];
}
else if (domain == "binary_sensor" && d_class != ''){
var translation = hass.resources[lang]["component." + domain + ".state." + d_class + "." + state]
var translation = hass.resources[lang]["component." + domain + ".entity_component." + d_class + ".state." + state]
}
else if (d_class == 'timestamp'){
var translation = formatter.format(diff, scale)
Expand Down Expand Up @@ -140,20 +140,20 @@ ulm_translation_engine:
else if (Math.abs(minutesDiff) < 60){ scale = 'minute'; diff = minutesDiff }
else if (Math.abs(hoursDiff) < 24){ scale = 'hour'; diff = hoursDiff }
if(hass.resources[lang]["component." + domain + ".state._." + state]){
var translation = hass.resources[lang]["component." + domain + ".state._." + state] + unit
if(hass.resources[lang]["component." + domain + ".entity_component._.state." + state]){
var translation = hass.resources[lang]["component." + domain + ".entity_component._.state." + state] + unit
} else {
var translation = state + unit;
}
if (def.includes(state)) {
var translation = hass.resources[lang]["state.default." + state ];
}
else if (domain == "binary_sensor" && d_class != ''){
var translation = hass.resources[lang]["component." + domain + ".state." + d_class + "." + state]
var translation = hass.resources[lang]["component." + domain + ".entity_component." + d_class + ".state." + state]
}
else if (domain == "media_player" && d_class != ''){
if (state == 'idle' || state == 'paused')
var translation = hass.resources[lang]["component." + domain + ".state." + state];
var translation = hass.resources[lang]["component." + domain + ".entity_component._.state." + state];
else {
var translation = (entity.attributes.source) + ' • ' + ( Math.round(entity.attributes.volume_level / 0.01)) + '%' ;
}
Expand Down
2 changes: 1 addition & 1 deletion hacs.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "UI Lovelace Minimalist",
"render_readme": true,
"homeassistant": "2023.4.0b5",
"homeassistant": "2023.4.3",
"zip_release": true,
"filename": "ui_lovelace_minimalist.zip"
}

0 comments on commit 6244100

Please sign in to comment.