Skip to content

Commit

Permalink
Merge pull request #1008 from basbruss/dev-release
Browse files Browse the repository at this point in the history
Add popup header cover
  • Loading branch information
basbruss committed Sep 23, 2022
2 parents 3042ca7 + d7122f6 commit c2fae21
Showing 1 changed file with 69 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
---
popup_header_cover:
template:
- "popup_button"
- "ulm_translation_engine"
label: >-
[[[
if (entity.state !="unavailable"){
if (typeof states[entity.entity_id].attributes.current_position === "undefined"){
if (states[entity.entity_id].state == "closed"){
return variables.ulm_translation_state;
} else
return variables.ulm_translation_state;
} else {
if (states[entity.entity_id].attributes.current_position == 0){
return variables.ulm_translation_state;
} else {
return variables.ulm_translation_state + " • " + (states[entity.entity_id].attributes.current_position) + "%" ;
}
}
} else {
return variables.ulm_translation_state;
}
]]]
show_name: true
show_label: true
styles:
grid:
- grid-template-areas: "'i' 'n' 'l'"
- grid-template-columns: "auto"
- grid-template-rows: "min-content min-content min-content"
label:
- justify-self: "center"
- font-weight: "bold"
- font-size: "12px"
- filter: "opacity(40%)"
icon:
- color: >
[[[
if (typeof states[entity.entity_id].attributes.current_position === "undefined"){
if (states[entity.entity_id].state == "closed"){
return 'rgba(var(--color-theme),0.2)';
} else
return 'rgba(var(--color-blue),1)'
} else {
if (states[entity.entity_id].attributes.current_position == 0){
return 'rgba(var(--color-theme),0.2)';
} else {
return 'rgba(var(--color-blue),1)'
}
}
]]]
img_cell:
- left: "2px"
- background-color: >
[[[
if (typeof states[entity.entity_id].attributes.current_position === "undefined"){
if (states[entity.entity_id].state == "closed"){
return 'rgba(var(--color-theme),0.05)';
} else
return 'rgba(var(--color-blue),0.2)';
} else {
if (states[entity.entity_id].attributes.current_position == 0){
return 'rgba(var(--color-theme),0.05)';
} else {
return 'rgba(var(--color-blue),0.2)';
}
}
]]]

0 comments on commit c2fae21

Please sign in to comment.